community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Convert today's date to Julian format

Highlighted
Asteroid

How can we convert DateTimeToday() i.e 02/06/2018 to Julian format i.e 19037? Is there a function/Tool in Alteryx? I'm quite new to Alteryx. Just curious to know does Alteryx use .net functions in the backend?

Alteryx Partner

This is what you're after ... 

 

ToNumber(DateTimeFormat(DateTimeToday(), "%j"))

2019-02-07 10_00_04-Alteryx Designer x64 - but000  Core extraction.yxmd_.png

Asteroid

Woah! that looks so simple, thank you so much! 

 

Current Date: 02/06/2019

Expected Julian Date: 19037

 

%j gives 37. How to get 190 which I believe is the month and the year in Julian format

Alteryx Partner

Oops, sorry I forgot about the year component:

 

Substring(DateTimeNow(),2,2)+
DateTimeFormat(DateTimeToday(), "%j")

I was cheating a bit and changing back to a number.  If I keep it as string and then add a year to the start :) 

Labels