0

I have this easy requirement where they want a field that displays the the CreatedDate field of the object but with seconds at the end.

enter image description here

I've created a formula field

enter image description here

but it's still showing like in the first image, no seconds added ....

Any idea on how to achieve this ?

1

This is a partial answer that may not meet your requirements

TEXT(Day( DATEVALUE(CreatedDate) )) & "/" &
TEXT(Month( DATEVALUE(CreatedDate) ))&"/"&
TEXT(Year( DATEVALUE(CreatedDate) )) & " " &
MID(TEXT(CreatedDate),12,8) & 
' UTC'

will display result in 24 hr time, UTC (not local time). For example:

25/11/2020 16:22:33 UTC
4
  • Bro, this kinda worked !!! Thank you so much .... Question ... why is it displayin the time in UTC and not in Local Time ? Is there a way to display it in local time ? – Nacho Zve De La Torre Nov 25 '20 at 20:02
  • 1
    Datetimes are stored as UTC and TEXT function grabs that. – cropredy Nov 25 '20 at 20:36
  • Hi cropredy, I thought you might be able to help me with this question too: salesforce.stackexchange.com/questions/327425/… – Nacho Zve De La Torre Nov 26 '20 at 23:16
  • Because what I really really need is to have the createdDate value in a new Date/Time variable, not a text one ... is there any way to achieve this with a formula ? – Nacho Zve De La Torre Nov 26 '20 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.