Date Format
-
Hi All , I would like to to have my two variables date1 and date2 to return the following format in Asp.net. Date1=20090625124000 and date2=20090625133900 Date1 and date2 have a diffrence on one hour in between. How can i build date1 and date2 Thank you in advance.
-
Hi All , I would like to to have my two variables date1 and date2 to return the following format in Asp.net. Date1=20090625124000 and date2=20090625133900 Date1 and date2 have a diffrence on one hour in between. How can i build date1 and date2 Thank you in advance.
-
Hi All , I would like to to have my two variables date1 and date2 to return the following format in Asp.net. Date1=20090625124000 and date2=20090625133900 Date1 and date2 have a diffrence on one hour in between. How can i build date1 and date2 Thank you in advance.
string _date1 = DateTime.Now.ToString("yyyyMMddHHmmss");
DateTime _dateNew = new DateTime(DateTime.Now.Year,
DateTime.Now.Month,
DateTime.Now.Day,
DateTime.Now.Hour - 1,
DateTime.Now.Minute - 1,
DateTime.Now.Second);
string _date2 = _dateNew.ToString("yyyyMMddHHmmss");Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.