In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

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
14 - Magnetar

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
14 - Magnetar

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
Top Solution Authors