Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Date formats from sample xml

Level 2
Level 2

There are many posts about date formatting, but could not really get what I want from them. many of them are related to getting and formatting current date. Here is my requirement. I need to pull the date field from sample xml ( data binding) which comes in format  yyyy-mm-dd and another field comes as yyyy/mm/dd

1. If Locale is "US

     Display as mm/dd/yyyy

    else if locale is "EUR"

     Display as dd/mm/yyyy

2. And I also I need to get the year, month and date for these fields to use them in writing some other logic.

I tried using string built in functions and not happy with it. Is there any date functions to define the date format dynamically for java script, instead of updating them on Formatting option of Date/Time field?



0 Replies