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
Julia ZocoloJulia Zocolo 

Full time from Date field to Date/Time formula

Hello Everyone,

I have read many posts and the knowledge articles regarding Date/Time formulas. However, I am confusing myself further.

I have a formula that converts a Date field, let's say Close Date, to "Date/Time." However, this only captures the hour versus the actual time stamp.

For what I need this for, I need to differentiate clearly to provide a true sequence of order. 

Formula: DATETIMEVALUE(CloseDate ) is only giving me the hour.
Is this a limitation?

Deal Date time
Christopher PettittChristopher Pettitt
Hi Julia, the Date class doesn't have any time information associated with it so when you go from Date to Date/Time it's just plugging in a time value based on your location in refernce to the UTC/GMT time zone (7:00 pm). Essentially, you're trying to get information that the field just doesn't have. The DATETIMEVALUE() function does not have a way of figuring out the time based solely on the date, you have to feed the date and time to it and then it will put it into the right format for you. Maybe try using the TIMENOW() function in conjunction with DATETIMEVALUE() but this will only return the time at the moment of the validation, whihc may be a problem if it's different than the closed date.  Hope this helps! 
Julia ZocoloJulia Zocolo
Thank you for confirming this @Christopher Pettitt !!
This is enough to get me to think a bit differently.
Greatly appreciate it! :-)
Cheers,
Julia