0

Im able to achieve getting date format to server time(LocalDateToSystemDate(@currentSystemTime)) or user time(now()) in ampscript. But i want this date format to be convert to sydney time how can we achieve?

1
  • I can help you here. However, before I answer your question, is the time zone of the Business Unit (as defined in Administration > Account Settings) set to Sydney time? And if not, what Marketing Cloud stack are you on? e.g. s7, s8, s10, etc (I need to know, as my answer will differ depending on the stack). Commented Aug 13, 2018 at 19:04

1 Answer 1

1

You can use the FormatDate function in AMPscript.

https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-programmatic-content.meta/mc-programmatic-content/FormatDate.htm

If you change the en_US to en_AU in the given example to get the time in Australia, it does the trick.

edit: In the end, you should use the below function; first parameter is the date you wish to convert:

%%=FormatDate("2012-10-05 03:21:34.567890", "MMM DD, YYYY", "HH:MM:SS.MMM", "en-AU")=%%

2
  • Please include a summary of the answer from the link as links often break when Salesforce rearrange their documentation.
    – Dave Humm
    Commented Aug 13, 2018 at 11:06
  • The en-AU argument in the FormatDate function will not magically set the date to Sydney time. There are 7 different timezones in Australia. This parameter simply defines the ISO locale code for the output. Commented Aug 13, 2018 at 19:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .