Skip to main content

Change date format and timezone

  • February 16, 2021
  • 3 replies
  • 134 views

Hi everyone!
Does someone know how could i change this “2021-02-16T21:30:18.110Z” (text type field) to a date and time format and change the time zone (the hour is coming with 5 hours of difference of what it should be, it says. “21:30” when it should be. “16:30”.
Thank you so much in advanced!

3 replies

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • February 16, 2021

You want to use a combination of the DATETIME_FORMAT() and SET_TIMEZONE() functions.

For example

DATETIME_FORMAT(
  SET_TIMEZONE({your date/time field}, 'America/New_York'), 
  'M/D/YYYY h:mm'
)

They are documented in the formula field reference.


  • Author
  • New Participant
  • February 17, 2021

You want to use a combination of the DATETIME_FORMAT() and SET_TIMEZONE() functions.

For example

DATETIME_FORMAT(
  SET_TIMEZONE({your date/time field}, 'America/New_York'), 
  'M/D/YYYY h:mm'
)

They are documented in the formula field reference.


thanks. for your response! One question, what if the field looks like this.: “2021-02-16T21:30:18.110Z” that would. be. “YYYY-MM-DD h:mm:ss”? or how should i put it?


ScottWorld
Forum|alt.badge.img+35
  • Genius
  • February 17, 2021

thanks. for your response! One question, what if the field looks like this.: “2021-02-16T21:30:18.110Z” that would. be. “YYYY-MM-DD h:mm:ss”? or how should i put it?


You can find all the format specifiers on this page: