Expression for specific date range and get information from yesterday + weekends
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I use the next expression to get information from yesterday in consideration of weekends (if it is Monday, keep Saturday and Sunday, if not, only the current day). But I would like to add a more expression to get data in an specific date range (from yesterday 1 a.m. till today 1.a.m). How can I do that? I am not clear about it...
The expression:
IF Datetimeformat(DateTimeToday(),"%a")="Mon"
// check if we are on Monday
THEN (DateTimeDiff(DateTimeToday(),Datetimetrim([Date_Process_2],"days"),"days")>=1
AND DateTimeDiff(DateTimeToday(),Datetimetrim([Date_Process_2],"days"),"days")<=3)
//keep Sat and Sunday
ELSE DateTimeDiff(DateTimeToday(),Datetimetrim([Date_Process_2],"days"),"days")=1
// keep the day as today (different from Monday)
ENDIF
Solved! Go to Solution.
- Labels:
- Output
- Transformation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you! I have to tested one Monday but it runs perfect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
If this thread is solved, please mark as solution so others may also find answers more easily!
