vb.net convert date into yy-mm-dd

  • Thread starter Thread starter jeskit
  • Start date Start date
J

jeskit

Guest
Hi,



i am trying to convert todays date into the format yy-mm-dd so i can be used as a file name. However it keeps coming out as yy-12-dd.

I have tried Convert.ToDateTime(Today).ToString("YY-MM-DD"), Date.Today.ToString("YY-MM-DD"), Format(Now, "YY-MM-DD") and i have also tried Format(Now).ToString("00") & "-" & Month(Now).ToString("00") & "-" & DateTime.Parse(Now).Day.ToString("00"), "YY-MM-DD") however this puts 2019-12-19

Is it that vb.net does not accept the date format yy-mm-dd or am i doing something wrong?

Continue reading...
 
Back
Top