API Date & Time

Hello- Can you assist me?
- How do I convert the "Date Completed" to US Eastern Date/Time
- What's the formula for getting the amount of time spent between Date Created and Date Completed, in Days/Mins/Seconds.
Thank you.
Answers
-
@Genevieve P. Can you please assist me? Thanks
-
@AndrΓ©e StarΓ₯ Can you assist me please?
-
If you're doing this through Bridge, I can offer how I do this. If you're using the API, sorry, I can't help. I did see the syntax of a timezone string shown in the API documentation here: https://smartsheet.redoc.ly/tag/users#operation/get-current-user
For a Bridge routine, here's an excerpt from one of my workflows where I wanted a timestamp in a specific timezone. Note that I customized the date and time format to fit the needs of the sheet I was updating. Also note the word 'formatted' must be added to the final Value string.
For date and time calculations, you may find this post by Paul helpful. Smartsheet views timestamps as a text string so you first must parse out the hours, minutes and seconds, then do math on each component.
Hope this helps
Kelly