function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SurekaSureka 

Date Time fields in the Database

Hi,

 

I am entering the following value in a DateTime feild - "6/10/2010 10:49 AM". But when I am checking this value in the Database it is stored as "2010-06-10 05:19:00". Can someone tell me why is this time difference? What changes should I make to get the same time as entered?

 

Thanks

SuperfellSuperfell

What timezone are you in? (dateTime are stored in UTC) how are you "checking the value in the database? "

SurekaSureka

Hi,

 

Thanks for the reply.

I am using system.debug to check the value. I am in IST(Indian Standard Time)

 

Thanks

desidskdesidsk

what statement u are using for debugging ? is it directly a datetime variable or  var.format() ?

If u are using format() , it is standard format that is returned by "format()" function ..

 

Thanks,

Dayanand