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?

  • 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). – Eliot Harper Aug 13 '18 at 19:04
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")=%%

  • Please include a summary of the answer from the link as links often break when Salesforce rearrange their documentation. – Dave Humm Aug 13 '18 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. – Eliot Harper Aug 13 '18 at 19:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.