issues with Formatdate function in ampscript

471 views Asked by At

I have an issue where I want to display only the hh.mm in da-DK from the NOW() function in AMPscript. I have tried the following two options.

formatdate(Now(),"","HH.mm","da-DK")

This inputs only time but servertime, ex. 03.16

format(Systemdatetolocaldate(Now()),"","hh.mm")

Correct time but the whole string, ex. 12/10/2020 10:16:44 AM

Anyone with some pointers?

1

There are 1 answers

0
Martin Enevoldsen On

I've found a "quickfix" with the set of

SET @redeemedHour = datePart(Systemdatetolocaldate(Now()),"H")
SET @redeemedMinute = datePart(Systemdatetolocaldate(Now()),"minute")

and then concanate