2

I've been using AMPScript and I've seen the documentation, run a few tests, and I've done a bit of Googling, but off-hand, I'm not really seeing a notable difference.

5

Now(P1)

Returns the current system date and time.

Arguments

P1 Optional parameter. Enter 1 or true to indicate true to preserve the email sent time for post-send resolution of Now. Example

Given the date and time 10 a.m., March 1, 2008.

Now()

System returns:

3/1/2008 10:00:00

Source

So it would appear you'll only see a noticeable difference if a sizeable amount of time passes between email sent time and when the code runs.

4
  • Yes, this is what I saw in the documentation, and what I would assume it means. I have run a few tests using both NOW() and NOW(1). Based off of that I'm not seeing a notable difference so far. I guess time (pun not completely intended) will tell. That said, the documentation does not go into great detail. To me it's pretty vague. For starters, what do they mean by "post-send" resolution? In what instances should I use which based off of what result I might want to get, or ultimately does it really matter which I use?
    – Kallie
    Dec 16 '15 at 14:45
  • My understanding is that if you do now(1), any now() there-after will return the same value, and that is is thus stored in memory as a variable. (I'm however entirely inexperienced with actually using marketing cloud) Dec 16 '15 at 14:53
  • 2
    Normally Now() (and any other AMPScript) will get re-evaluated when an SFMC email is viewed as a webpage. Dec 16 '15 at 15:09
  • Ah ha! Thanks @AdamSpriggs! That helps tremendously :D
    – Kallie
    Dec 16 '15 at 15:30
0

The static method Datetime.now() has no parameters so you should not use any. Attempts will be ignored by the system or cause en error.

Datetime Static Methods: NOW()

Returns the current Datetime based on a GMT calendar. Signature public static Datetime now()

Parameters None

Return Value Type: Datetime

The format of the returned datetime is: 'MM/DD/YYYY HH:MM PERIOD'

Example datetime myDateTime = datetime.now();

3
  • Actually, I was referring to the AMPScript function NOW(), but I did not realize there were other methods. I will look into that. Thanks!
    – Kallie
    Dec 16 '15 at 14:43
  • This is what I thought until I saw it was tagged as AMPScript. @Kallie May be worth making it a bit clearer what you're asking for future questions. :) Easy thing to overlook though when you're nose deep in a particular language or something.
    – Dan Jones
    Dec 16 '15 at 14:48
  • 1
    My apologies! Yes, this would be my first post. I've updated the question. Thank you for the suggestion!
    – Kallie
    Dec 16 '15 at 14:50
0

Now() will give current system date, If a user opens the e-mail again or views it as a webpage it gets updated. Now(1) will always return the sent date. Example:

  • Sent: Email is sent on Jan, 1, 2017 10 AM

  • Open 1: User first opens the email at Jan, 1, 2017 18 AM

  • Open 2: User opens the email at Jan, 2, 2017 16 AM


Now() = 
Open 1: Jan, 1, 2017 18 AM
Open 2: Jan, 2, 2017 16 AM

Now(1) = 
Open 1: Jan, 1, 2017 10 AM
Open 2: Jan, 1, 2017 10 AM

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.