Add time to the date
- 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
Hi all,
I need your advice regarding adding time to the given date. In my data set I have start date and length in hours, therefore based on those information I need calculate end date. I attached Alteryx workflow with Data example.
Thanks in advance!
Asia
Solved! Go to Solution.
- 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
Since you have length with decimal i ended up creating 2 variations
Variation 1: i added length as hours directly. Observation on this was decimal were converted to whole numbers (ex 4.75hr converted to 4hr) refer the below output.
Variation 2: i added length by converting decimal hrs to mins (length * 60). Observation here was it was accommodating the decimal hours
Hope this helps 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
The second option did the work 🙂 Thank you so much for a quick help!
Asia
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you for the suggestion! The length was in hours so to be able to convert it into minutes it was needed to multiply it by 60.
This is the example of the formula that did the job :
DateTimeAdd(
DateTimeParse([Start date],"%d/%m/%y %H:%M")
,[length]*60,"minutes")
Thank!
Asia
