Date Formatting

  • 59Views
  • Last Post 4 weeks ago
0
votes
Nicole Varner posted this 12 July 2022

Hello,

Is there a resource that would help me understand the specifications of the locale parameter? I am trying to get my date values to appear in ISO format (YYYY-MM-DD). I know I can user locale to impact the date format, is this the best way? Or would another parameter be better?

Thank you!

Order By: Standard | Newest | Votes
0
votes
Nataliia Nikulina posted this 14 July 2022

Hello Nicole,

Thank you for contacting Skyvia Support team.

Yes, changing the Locale settings in the package will help to change the date format. Please choose the option that will suit you among the list available in the package.

Should you have any further questions, let us know. 

Best regards,

Nataliia

0
votes
Nicole Varner posted this 15 July 2022

Hi Nataliia,

Is there any documentation I can reference that details the specifics of each locale? Do you know which one had the ISO date format ((YYYY-MM-DD)?

Thank you!

0
votes
Nicole Varner posted this 18 July 2022

Hi Nataliia,

I was able to find a locale that gave me YYYY/M/D but is there a better way to get the exact date format I am looking for? Paricularly with use of dash vs slash?

Thanks again,

Nicole

0
votes
Nataliia Nikulina posted this 5 weeks ago

Hello Nicole,

Thank you for the update.

Generally, the German locale should meet your needs but if you choose this option in the package date format will be different from those you are trying to achieve.

Let me consult about this with our development team and get back to you with a reply. 

Best regards,

Nataliia

0
votes
Nicole Varner posted this 4 weeks ago

Thanks Nataliia. I was able to use the strftime function to get what I needed. It's a very flexible way to get any date format you need. Here's how it turned out. 

Syntax: strftime(format, timestring, modifier, modifier, ...)
Example: SELECT(STRFTIME('%Y-%m-%d', SAMPLE_FIELD) AS "Sample Date")

I think I am all set for now.

0
votes
Nataliia Nikulina posted this 4 weeks ago

Hello Nicole,

Thank you for the update. 

We are happy to hear that you were able to meet your needs using this function.

Best regards,

Nataliia

Close