I have the following block of AmpScript at the top of an email in Marketing Cloud
%%[
var @now, @cdp, @bookingStart, @bookingEnd, @pickupStart, @pickupEnd
SET @now = now()
/* MAY17 */
IF (now() > "5/18/2017 00:00 AM" AND now() < "6/08/2017 23:59 PM") THEN
SET @cdp = "***"
SET @bookingStart = "18/05/2017"
SET @bookingEnd = "08/16/2017"
SET @pickupStart = "19/05/2017"
SET @pickupEnd = "14/06/2017"
/* JUN17 */
ELSEIF (now() > "6/15/2017 00:00 AM" AND now() < "6/30/2017 23:59 PM") THEN
SET @cdp = "***"
SET @bookingStart = "15/06/2017"
SET @bookingEnd = "30/06/2017"
SET @pickupStart = "16/06/2017"
SET @pickupEnd = "30/06/2017"
SET @now = "JUNE"
/* JUL17 */
ELSEIF (now() > "7/20/2017 00:00 AM" AND now() < "8/10/2017 23:59 PM") THEN
SET @cdp = "***"
SET @bookingStart = "20/07/2017"
SET @bookingEnd = "10/08/2017"
SET @pickupStart = "18/08/2017"
SET @pickupEnd = "08/09/2017"
/* AUG17 */
ELSEIF (now() >= "8/17/2017 00:00 AM" AND now() <= "9/07/2017 23:59 PM") THEN
SET @cdp = "***"
SET @bookingStart = "17/08/2017"
SET @bookingEnd = "07/09/2017"
SET @pickupStart = "09/09/2017"
SET @pickupEnd = "30/09/2017"
/* SEP17 */
ELSEIF (now() > "9/21/2017 00:00 AM" AND now() < "10/12/2017 23:59 PM") THEN
SET @cdp = "***"
SET @bookingStart = "21/09/2017"
SET @bookingEnd = "12/10/2017"
SET @pickupStart = "22/09/2017"
SET @pickupEnd = "18/10/2017"
/* OCT17 */
ELSEIF (now() > "10/19/2017 00:00 AM" AND now() < "11/09/2017 23:59 PM") THEN
SET @cdp = "***"
SET @bookingStart = "19/10/2017"
SET @bookingEnd = "09/11/2017"
SET @pickupStart = "20/10/2017"
SET @pickupEnd = "15/11/2017"
/* NOV17 */
ELSEIF (now() > "11/16/2017 00:00 AM" AND now() < "12/07/2017 23:59 PM") THEN
SET @cdp = "***"
SET @bookingStart = "16/11/2017"
SET @bookingEnd = "07/12/2017"
SET @pickupStart = "17/11/2017"
SET @pickupEnd = "14/12/2017"
/* DEC17 */
ELSEIF (now() > "12/21/2017 00:00 AM" AND now() < "1/11/2018 23:59 PM") THEN
SET @cdp = "***"
SET @bookingStart = "21/12/2017"
SET @bookingEnd = "11/01/2018"
SET @pickupStart = "27/12/2017"
SET @pickupEnd = "28/01/2018"
ENDIF
]%%
In the body of the email I am outputting all the variables in the IF block, but get an empty string back for each one.
... by %%=v(@bookingEnd)=%% using CDP %%=v(@cdp)=%%. ...
The output of %%=v(@now)=%%
is
6/14/2017 7:48:08 AM
Note: Actual CDP codes have been replaced with "***" in the above code.