Alteryx Designer Desktop Discussions

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

DateTimeDiff() on minutes doesn't work as intended

kelvenlim
7 - Meteor

al2.png

 

The first image shows the times in 24h and string format.

 

al3.png

The second image shows me using datetimediff() on the current date and the field, and giving me the minutes. But after executing, it gives me a super big number. Does anyone know what's wrong?

 

Thank you.

6 REPLIES 6
ShankerV
17 - Castor

Hi @kelvenlim 

 

Both the images are same.

So could see the time used. Please can you help on the time used in first screenshot.

 

 

Many thanks

Shanker V

kelvenlim
7 - Meteor

@ShankerV I edited the post. Are both images okay now?

ShankerV
17 - Castor

Hi @kelvenlim 

 

Please find the expected output.

 

ShankerV_0-1675666591301.png

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @kelvenlim 

 

As per the image I understand you remove the date and use only time.

Hence I am also getting the same random number in minutes,

 

Actually we need some date to get the right output.

Hence today's date is added to to get the desired output.

 

I have tried to achieve the result in one tool also as below.

ShankerV_0-1675666956419.png

 

Many thanks

Shanker V

kelvenlim
7 - Meteor

Thank you @ShankerV .

 

Turns our datetimetoday() and datetimenow() are different. I thought they would give the same result. The tables values are now showing what I expected.

ShankerV
17 - Castor

Hi @kelvenlim 

 

Datetimetoday() will give only today's date with time as 00:00:00

Datetimenow() will give today's date with current time too.

 

Many thanks

Shanker V

Labels