Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I am having trouble with the timestamp function. I want to be able to get this as my end result '2019-01-01 00:00:00' from the variable. Which is basically 2 years from current year.
This is the code in my data load editor
SET TimeFormat='hh:mm:ss TT';
SET DateFormat='MM/DD/YYYY';
SET TimestampFormat='MM/DD/YYYY hh:mm:ss[.fff] TT';
Let vTimePeriod = Timestamp(YearStart(Today(), -2), 'YYYY-MM-DD HH:MM:SS');
//Let vTimePeriod = '2019-01-01 00:00:00';
The variable instead gives me '2019-01-01 00:01:00'. Not sure what could be done to fix this, looking for help.
Thankyou
Your format should be lowercase hh:mm:ss, rather than uppercase (same as it appears in the SET statement, in fact). MM is month, not minute, so that's throwing your format off.
Your format should be lowercase hh:mm:ss, rather than uppercase (same as it appears in the SET statement, in fact). MM is month, not minute, so that's throwing your format off.