I could do with some wisdom on how to calculate a date.
I'm trying to set a date in a field using a CASE statement. I have Virtual Field 1 which is capturing today's date without timestamp (pls see image). I also have a number (in this case 30) stored in Virtual Field 4.
I am trying to add the two together and have the result formatted without time stamp (e.g. 25 May 2021) but when I do this I get 31 Jan 1900. See my CASE statement below, the red part is the part that's not working.
CASE
WHEN DateDiff(day, SysUTCDateTime(), [@field:Date_1]) > [@cbParamVirtual4]
THEN DateAdd(day, [@cbParamVirtual4],CONVERT(DATE, '[@cbParamVirtual1]', 103))
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
JKSGT
Hi,
I could do with some wisdom on how to calculate a date.
I'm trying to set a date in a field using a CASE statement. I have Virtual Field 1 which is capturing today's date without timestamp (pls see image). I also have a number (in this case 30) stored in Virtual Field 4.
I am trying to add the two together and have the result formatted without time stamp (e.g. 25 May 2021) but when I do this I get 31 Jan 1900. See my CASE statement below, the red part is the part that's not working.
CASE
WHEN DateDiff(day, SysUTCDateTime(), [@field:Date_1]) > [@cbParamVirtual4]
THEN DateAdd(day, [@cbParamVirtual4],CONVERT(DATE, '[@cbParamVirtual1]', 103))
ELSE [@field:Date_1]
END
Many thanks
Jay
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.