Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi all,
I am having an issue when trying to run this power query. I have a query that converts my date time column, to military time (i.e. 13:00:00). I am trying to get this query to work, but it is giving me errors since I cannot use the operators that I have in the query.
= if [#"end_time (Time Only)"] >= "05:00:00" and [#"end_time (Time Only)"] < "17:00:00"
then "FAIL"
else "PASS"
If anyone has advice on how correct my formatting so I am able to use these operators, that would be much appreciated!
Solved! Go to Solution.
A time will be
#time(hour as number, minute as number, second as number)
"05:00:00" is a string.
That should be enough to get you a little further
Hi @Anonymous ,
You could use Time.FromText() to convert String to Time type:
if [Time]>=Time.FromText("05:00:00") and [Time]<Time.FromText("17:00:00") then "FAIL" else "PASS"
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
A time will be
#time(hour as number, minute as number, second as number)
"05:00:00" is a string.
That should be enough to get you a little further
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 6 | |
| 5 |