Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to add 2 days to the current date, but if we are on the 30th or 31st of the month that tells me it is the day of the following month, that is, if we are on the 31st, it brings me the date of the 2nd of the next month, is that possible?
I am not sure I understand completely because your description says one thing and your example says another. So, here are some alternatives:
- Same date as today, 2 years in the future:
AddYears(Today(), 2)
- Same date as today, 2 years in the past:
AddYears(Today(), -2)
- Two days after today, two years in the future:
AddYears(Today() + 2, 2)
Anything else you need would be a version of one of these examples.
If you want to add 2 days, simply do a +2
Date(Today()+2)
Write
Date(CurrentDate+2) as Newcolumnname in Script
Ok, thank you very much, but if I want to see two years ahead of the same date last year, that is, today is 05/15/2024, how can I get the date of 05/17/2023?
use
AddYears(CurrentDate, 2)
I am not sure I understand completely because your description says one thing and your example says another. So, here are some alternatives:
- Same date as today, 2 years in the future:
AddYears(Today(), 2)
- Same date as today, 2 years in the past:
AddYears(Today(), -2)
- Two days after today, two years in the future:
AddYears(Today() + 2, 2)
Anything else you need would be a version of one of these examples.