how to save date in IST format on server
heys guys, i want to store the date in IST format in sql server 2008, my issue is i have an error log table, whenever there is any problem in my website, it save the entry in database, now what i want to do is, i want to store the date in IST format, so tha开发者_Python百科t i can come to know the occurance of the error if my client complains for any.. but i dont get an option to convert date in IST format before saving in sqlserver.
Dates (datetimes) are stored as binary; the format is only an issue when you display (or output) a date as text.
You can format a date using CONVERT
Also see:
- Date and Time Functions (TSQL)
- Custom Date and Time Format Strings (.NET)
- String Formatting in C#
精彩评论