Forum Discussion
smpa01
7 years agoCommunity Champion
Date Time Testing (M not DAX)
Hello Experts,
I have a Datetime value column as following
| Custom |
| 6/3/2019 5:25:07 AM |
| 6/3/2019 6:25:07 AM |
| 6/7/2019 5:57:44 PM |
| 6/7/2019 6:21:17 PM |
| 6/26/2019 3:49:20 PM |
| 7/26/2019 2:36:33 PM |
| 7/25/2019 10:36:32 AM |
| 7/31/2019 1:55:43 PM |
| 5/2/2019 9:18:05 AM |
| 6/21/2019 1:13:03 PM |
| 6/27/2019 5:39:27 AM |
| 7/17/2019 7:20:01 AM |
| 7/17/2019 6:17:48 AM |
| 6/27/2019 5:36:12 AM |
| 7/17/2019 6:12:44 AM |
| 6/27/2019 6:03:51 AM |
| 5/31/2019 12:29:19 PM |
| 7/9/2019 9:27:54 AM |
| 8/8/2019 8:21:38 AM |
| 8/3/2019 7:19:40 AM |
| 6/25/2019 10:05:13 AM |
I need to test each value for following 2 clauses
A) if the day is Friday is it after 6:00 PM
B) if the day is Monday is it before 6:00 AM
I can check the date part by applying Date.DayOfWeekName. But I can't find out how to test whether the time portion is after 1800 hrs on a Friday or 0600 hrs on a Monday.
If someone can please point me to the correct direction would be great.
Thank you in advance.
Give this a try.
Time.From ([Custom]) > Time.From ("18:00")This is the check for > 6:00 pm
jdbuchanan71 it worked !!! thanks for the help.
2 Replies
- jdbuchanan71Super User
Give this a try.
Time.From ([Custom]) > Time.From ("18:00")This is the check for > 6:00 pm
- smpa01Community Champion
jdbuchanan71 it worked !!! thanks for the help.