SQL server saves date in local region format, for example if
you’re in india and hosting your site with godaddy and choose Asia server then
your date will be 12 hour forward compare to current region.
So if you want
match the data as indian locale date use the following code while inserting
date in server.
CONVERT(datetime,SWITCHOFFSET(CONVERT(datetimeoffset,GetUTCDate()),'+05:30'))
No comments:
Post a Comment