Alteryx Designer Desktop Discussions

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

Convert today's date to Julian format

monish_chandra
8 - 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?

3 REPLIES 3
cmcclellan
13 - Pulsar

This is what you're after ... 

 

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

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

monish_chandra
8 - 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

cmcclellan
13 - Pulsar

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