Hi Mike,
As for the problem on retrieve back the output date string and format back
to the original format, I think you can try using the DateTime.Parse method
to reconstruct a DateTime instance from a date string such as:
DateTime date1 = DateTime.Parse("2004-5-2");
DateTime date2 = DateTime.Parse("5/2/2004");
DateTime date3 = DateTime.Parse("2004/5/2");
Then, we can get whatever output format of the datetime via its ToString
method, just as:
Response.Write("<br>yyyy/M/d: "+ date.ToString("yyyy/M/d"));
Response.Write("<br>mm/dd/yyyy: " + date.ToString("mm/dd/yyyy"));
Response.Write("<br>yyyy-mm-dd: " + date.ToString("yyyy-mm-dd"));
For more info on the DateTime class 's Parse or ToString format, you can
reference the msdn library:
http://msdn.microsoft.com/library/en...omdatetimeform
atstrings.asp?frame=true
In addition, I also recommend that you consider Ken 's suggetion on use a
hidden column to hold the original Date info. That'll be more convenient.
Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx