Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Added on October 11, 2024 7:54AM
Likes: 0
Replies: 4
Hi.
I want to extract data from 7 AM to 10 AM, regardless of the date, in Datetime, but I don't know how to do it.
Thank you.
You said 7AM initially not 7:30AM so you have changed your requirements. 😉
You can use datePart() in a formula to extract the hours and minutes, joined together and filter for records in the 730 to 1000 range:
(datePart(Time_parsed, "hours")*100)+datePart(Time_parsed, "minutes")
In a Prepare recipe use the Extract Date Components processor to extract the hour:
https://doc.dataiku.com/dss/latest/preparation/dates.html#extracting-date-components
Thank you. I used that method for filtering as well. However, with this method, it's not possible to filter time range like 7:30 AM to 10 AM. So I'm searching for another solution.
Thank you. I solved issue.