You can then store this date in your database.
DateTime dateUTC = DateTime.Now.ToUniversalTime();
If you want to display it back to local time use:
DateTime dateLocal = dateUTC.ToLocalTime();
Reference: http://forums.asp.net/t/1217716.aspx
Programming Journal C#, Java, SQL and to a lesser extent HTML, CSS, XML, and regex. I made this so other programmers could benefit from my experience.
You can then store this date in your database.
DateTime dateUTC = DateTime.Now.ToUniversalTime();
DateTime dateLocal = dateUTC.ToLocalTime();
No comments:
Post a Comment