0

We have field in salesforce which stores the current timestamp in milliseconds.We are updating values from MC to SC with default salesforce amp script functions.But there is no functions in AMP script to convert date to milliseconds.I know we can update through JS but since we are using salesforce amp script functions we need the solution in AMP script itself.

Can someone help me on this?

0

1 Answer 1

1

You could use whatever date/time variable you are pulling, and then combine it with "FormatDate" ampscript:

https://help.marketingcloud.com/en/documentation/ampscript/ampscript_syntax_guide/utilities_ampscript_functions/formatdate/

This should allow you to reach the desired format, including milliseconds

7
  • Thanks for your response.I have tried that and my code is %%=FormatDate(Now(), , "fff")=%% but i dont think so its a correct value.This is the current time 6/30/2017 3:45:18 AM and its converted into 291 milliseconds.I need the output like from this site currentmillis.com example :1497615147094 Jun 30, 2017 at 9:47
  • Is it something you can help me on Jun 30, 2017 at 9:48
  • That i do not believe is possible - if you take a look at the supported date/time formats, the format you are describing is not present: help.marketingcloud.com/globalassets/documentation/6725/… Jun 30, 2017 at 9:57
  • but - why do you need it in that format? would 6/30/2017 3:45:18 AM not be sufficient? Jun 30, 2017 at 9:57
  • I don't know the purpose of this field but they want us pass the current time stamp to milliseconds Jun 30, 2017 at 9:58

You must log in to answer this question.

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