DATETIME_FORMAT how to set SET_TIMEZONE + SET_LOCALE

As you can expect, I am using a function field to manipulate a time field;
two issues appeared

  1. gmt zone went crazy inside the new form field
  2. language for dates now are shown in english.

Two solutions came to rescue:

  1. For issue # 1 I can use:
    DATETIME_FORMAT(SET_TIMEZONE({date field}, 'America/Bogota'), 'dddd, MMM D, YYYY h:mm a')

  2. for issue #2 I can use:
    DATETIME_FORMAT(SET_LOCALE({date field}, 'es'), 'dddd, MMM D, YYYY h:mm a')

They both work perfectly INDIVIDUALLY,

How can I combine these 2 formats inside one single formula.

Welcome to the community, @Lewis_Sternberg!

You can use this formula:

DATETIME_FORMAT(SET_LOCALE(SET_TIMEZONE({date field}, 'America/Bogota'),'es'),'dddd, MMM D, YYYY h:mm a')

Fantastic !

Couldn’t find a sample before asking the community.

Thanx for the help.

1 Like

Glad I could help! :slight_smile: If you don’t mind, could you please mark my comment above as the solution to your question? This will help other people who have a similar question in the future. :slight_smile:

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.