Platform

 View Only

 Convert Timestamp date into a common date format

Jump to  Best Answer
  • Platform
Apptio Community Member's profile image
Apptio Community Member posted Wed November 17, 2021 04:28 PM
Hello.

Is it possible to convert or to parse a Timestamp date value into a common date format within apptio?

I'm importing data and has the date data field but it's in Timestamp which is not very useful I want to be able to have it in a common format like MM/DD/YY.

For example I'm getting this value 1635059422000 which is "Sunday, 24 October 2021 02:10:22" but I haven't found a way to convert it within apptio. I tried using the DateFormat() formula but it doesn't work it gives me incorrect results.

Any help is appreciated

Thanks

#Platform
Alex Allan's profile image
Alex Allan  Best Answer
Hi Luis,

If all you are looking for is a date then please consider the following...

1)  Date value loaded as a number:


2)  Divide the date value by 1000 and then apply the DateFormat() function:



Please refer to the following Help Centre page for a comprehensive view on available date formats:

  • https://help.apptio.com/en-us/studio/formulas-and-functions/functions/dateformat.htm?Highlight=date%20format
Hope this helps and please let me know if you have any further questions.

Thanks Luis.
Alex.
#Platform
Doug Silk's profile image
Doug Silk

Hi Luis,

Just to add to Alex's answer, your timestamp is based in milliseconds whereas Apptio's timestamps are in seconds which is why you need to divide by 1000 to get the correct date.


#Platform
Apptio Community Member's profile image
Apptio Community Member
Thanks both. It worked. Appreciate the help!
#Platform