Alteryx Designer Desktop Discussions

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

count no of data between two dates - dates having diff format

ysreenumba
7 - Meteor

Hi All,

 

I want count no of days between two dates but problem is source and current date having diff format like below

 

source (hiredate) - 08-Sep-81

currentdate DateTimeToday() - 2019-05-27

 

Please help me 

 

Thanks

Sreeni

4 REPLIES 4
Thableaus
17 - Castor
17 - Castor

Hi @ysreenumba 

 

You can use the DateTimeParse function to bring your data to Alteryx format.

 

DateTimeparse.PNG

 

DateTimeParse([HireDate], "%d-%b-%y")

 

Cheers,

Thableaus
17 - Castor
17 - Castor

@ysreenumba 

 

You can check more about how to parse dates, specifiers and functions here:

https://help.alteryx.com/10.1/Reference/DateTimeFunctions.htm

 

Cheers,

ysreenumba
7 - Meteor

@Thableaus  Thanks for help. 

Thableaus
17 - Castor
17 - Castor

@ysreenumba 

 

Sure, no problem, but the link I left you has all the references.

 

%d 

%d

Day of the month as two digits, from 01 to 31

 

%b

%b

 

The abbreviated month name (Feb, Oct)

 

%y

%y

The two digit year.

 

the "-" is part of the string.

 

So %d-%b-%y represents your date in the format it came. (08-Sep-81)

 

Cheers,

Labels