Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi friends,
I want to get the next monday date from the given date like if i have a date called 8/12/2017 . from this date i want to get the next monday date like 11/12/2017 . in the same manner i have to get month last date also like 29/12/2017, i have to get 1/2/2018 in the load script.
Any help is much appreciated friends.
please let me know in case of any clarifications.
This will return today's date if today is a Monday, otherwise the next Monday.
if(num(weekday(<YourDateField>)) = 0,
<YourDateField>,
date(<YourDateField>+ 7 - num(weekday(<YourDateField>)) )
)
This will return the next Monday
date(<YourDateField> + 7 - num(weekday(<YourDateField>)) )
Maybe something like
Weekstart(Max(DateField)+6)
to get next monday for a given date field value (used Max() in case there are more than one possible values).
Hi Praveen,
Try,
Date(WeekEnd(Date#('8/12/2017','DD/MM/YYYY'))+1)
This will return today's date if today is a Monday, otherwise the next Monday.
if(num(weekday(<YourDateField>)) = 0,
<YourDateField>,
date(<YourDateField>+ 7 - num(weekday(<YourDateField>)) )
)
This will return the next Monday
date(<YourDateField> + 7 - num(weekday(<YourDateField>)) )
give it a try with
WEEKSTART(MyDate) +7
second one is not quite clear
MONTHSTART(ADDMONTHS(MyDate), 1)) should deliver the first day of the next month
Very thanks, this is exactly what i want.
Or simply try,
WeekEnd(DateField,0,1)