1

I have the following ampscript written to display a time in SMS in mobile connect, but whenever I test it out the result shows up in 24 hr time (e.g. '17:00 PM') is there an ampscript function for this or do I need to write something custom?

%%[ 
 set @Mobile = Mobile_Number set @ActivityID= Lookup("ApptJourneyEntryImport","Activity ID", "Opportunity Contact: MobileSMSFormatted", Mobile_Number) 
set @ApptDate = Lookup("ApptJourneyEntryImport","Appt Start Time", "Activity ID", @ActivityID) 
set @ApptDate = Lookup("ApptJourneyEntryImport","Due Time", "Activity ID", @ActivityID) 
set @Fname = Lookup("ApptJourneyEntryImport","Contact First Name", "Activity ID", @ActivityID) 


 ]%% 

%%=v(@Fname)=%% 
%%=FormatDate(@ApptDate, "MM/DD",  "en-US")=%%
%%=FormatDate(@ApptTime, "hh:mm tt", "en-US")=%%
2
  • Can you send a test email to yourself with this and see if you get the same thing? The SFMC is supposed to support all c# string formatting, and yours looks correct.
    – Timothy
    Commented Apr 16, 2018 at 18:44
  • When I use this in an email I get the date as I expect it in 12 hour time
    – ZackB
    Commented Apr 16, 2018 at 19:11

0

You must log in to answer this question.

Browse other questions tagged .