Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to get Timezone while formatting the date

    I need to format date in MM/dd/yyyy HH:mm z format

    If I use toUSShortDateTime(), I get date in MM/dd/yyyy HH:mm format. Timezone information is missing

    For eg. the date after formatting is

    2010/10/08 14:58

    and I need it in following format.

    2010/10/08 14:58 EDT

    How can I get timezone information?

    #2
    That's not a built-in format, so you'll need to define a custom formatter. The timezone can be derived via standard JavaScript Date APIs on the Date instance that is passed to your formatter.

    Comment

    Working...
    X