SOLVED
Conversion of double Data type to time
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Zion777
7 - Meteor
‎05-23-2023
12:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi All,
I am trying to calculate "time not allocated" where I have dividing (16/3600/24) i.e. not_allocated_time in sec / expected_break in secs /Hours.
I trying to convert to time, I am getting all the expected result.
Attached the sample .yxzp file for your reference.
S.No | not_allocated_time in sec | expected_break in secs | Hours | time not Allocated | Calculation(exp) |
1 | 16 | 3600 | 24 | 0:00:16 | 16/3600/24 |
2 | 0 | 3600 | 24 | 0:00:00 | |
3 | 40 | 3600 | 24 | 0:00:40 | |
4 | 21 | 3600 | 24 | 0:00:21 | |
5 | 11 | 3600 | 24 | 0:00:11 | |
6 | 6 | 3600 | 24 | 0:00:06 | |
7 | 15 | 3600 | 24 | 0:00:15 | |
8 | 1 | 3600 | 24 | 0:00:01 | |
9 | 4 | 3600 | 24 | 0:00:04 |
Solved! Go to Solution.
Labels:
- Labels:
- Date Time
2 REPLIES 2
FrederikE
13 - Pulsar
‎05-23-2023
12:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @Zion777,
You can calculate this with this formula:
DateTimeAdd('1900-01-01 00:00:00',[not_allocated_time in sec],'seconds')
Advantage of doing it this way is that you can build Alteryx's functions instead of writing a numerical calculation.
(the 1900-01-01 is just require so its a DateTime and not only a Time, the Date is cut off again anyway).
‎05-23-2023
06:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you so much for your help, Frederik :)
