When I add the following code to a landing page, it stores the Timestamp (which is a date field in the data extension) as 6/13/2014 1:12 PM

Why is it not storing like this instead? 06/13/2014 1:12 PM

SET @status = UpsertData("ENT.ABC", 1, "EMAIL ADDRESS", @e, "TIMESTAMP", FORMAT(SystemDateToLocalDate(NOW()),"MM/dd/yyyy HH:mm"))


It actually stored as a SQL datetime; its the intrinsic display formatting giving you issues. If you really need the format you specified, you can either:

  1. Store it as a string.
  2. Reformat it when you need to display it using C# format strings.

Hope this helps!

  • ok. this seems to work. I want to store time in AM/PM. How do I format this? – user8755 Jun 13 '14 at 20:19
  • You would use: "MM/dd/yyyy HH:mm tt" – Timothy Jun 14 '14 at 1:34

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.