Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Getting time in correct format to be able to see total minutes and difference in minutes

mcas1
7 - Meteor

I have:

 

01 23:58:23 and 02 00:02:11 where the format is "Day of month hour:minute:second" in UTC. this would be an order placed at 11:58pm on day 1 of the month and it's delivered at 12:02am on the next day. I need to see total time in minutes to deliver, and the difference as well in minutes. I also need to convert the time from UTC to PST.

 

There will be cases with same day and overnight deliveries

 

Help on any of the above would be very appreciated!

 

Thanks!

7 REPLIES 7
MarqueeCrew
20 - Arcturus
20 - Arcturus

@mcas1 ,

 

 here's a post to help:

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/UTC-to-Central-Time-conversion/td-p/62...  

 

you can modify the solution by one hour to get you Eastern time. 

cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
mcas1
7 - Meteor

Thanks but my data is in a weird format so it's not that simple as far as i can tell.

 

 

mcas1
7 - Meteor

@MarqueeCrew ,

 

Still unable to figure it out. I have a day/time that goes from May 31 to June 1, but with DateTimeAdd, for some reason rather than going to June 1, it goes to April 30th. Any advice appreciated this is time sensitive. Thanks very much.

 

My method is:

1. Adding "2013-05" to the date so that it becomes "YYYY-MM-DD HH:MM:SS ...." then i tried using DateTimeAdd.

 

THanks

 

 

AngelosPachis
16 - Nebula

Hi @mcas1 ,

 

Can you provide a sample of the dataset so we can see how the data looks like? To find the difference between the order and delivery date, why don't you give DateTimeDiff function a try?

mcas1
7 - Meteor

 

This is the raw data. First needs to be converted from UTC to PST. 

 

Treat this as Column A to D. I need to be able to see difference between D-A and C-A. The problem i'm having is with dates below where they cross from 31st of one month to the 1st of another. All other dates within the month appear to be working properly.

 

Thank you for the help i appreciate it.

 

 

 

31 23:59:5601 18:12:5401 18:15:0301 18:42:18
31 23:59:4601 00:39:0401 01:08:0301 01:49:07
31 23:58:4201 00:30:1101 01:08:5501 01:16:24
31 23:58:3401 00:00:5101 00:10:5901 00:46:20
31 23:58:1601 00:00:5401 00:10:0401 00:34:24
31 23:57:5831 23:59:55 01 00:46:06
31 23:57:1631 23:58:1701 00:10:1301 00:31:26
31 23:57:0401 00:11:5101 00:41:4901 01:03:07
31 23:56:3231 23:56:5501 00:08:3701 00:57:28
31 23:56:1431 23:56:4601 00:14:2701 00:34:19
31 23:55:2601 17:38:3801 18:15:5601 18:55:49
31 23:54:2031 23:56:1001 00:08:4601 00:35:48
31 23:54:1631 23:55:5401 00:15:1101 00:40:40
31 23:54:1031 23:55:4801 00:02:4001 00:19:21
31 23:52:4831 23:53:34 01 00:59:50
31 23:49:4731 23:51:1401 00:19:4601 00:46:05
31 23:46:2531 23:47:4331 23:56:3401 00:22:23
31 23:46:0201 00:09:26  
    
    
    
    
    
    
    
    
    
    
    
    
    
AngelosPachis
16 - Nebula

Hi @mcas1 ,

 

I have created a workflow that probably answers your question. It follows a brute force method, so it is not very flexible if for example you had more than 4 columns, then the workflow wouldn't work.

 

AngelosPachis_0-1607207773521.png

 

The logic I've used was to first convert column A to a date. Then every event because it follows the event located in the previous column, should look at that previous column to get information about the year and the month. If the day number of a column is less than that of a previous column, then that means that the months has changed and so the month for this column would be the previous month +1. Same logic for a jump in year.

 

To convert from UTC to PST I used a multi-field formula tool and subtracted 8 hours from all fields.

 

Hope it works for you, let me know if we should come up with a more robust solution or this one would suffice and is good enough.

 

Regards,

 

Angelos

 

mcas1
7 - Meteor

Wow - thank you so much. That did it. You are a pro, and those formulas are impressive. Thank you so much for taking the time to help me.

Labels