Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Dates with 2-digit year - a comment

YK_dup_378
7 - Meteor

Hi All,

 

This post is more of a comment on the Alteryx help page for Date Time Functions. Please click link below to see the help page:

 

https://help.alteryx.com/10.0/index.htm#Reference/DateTimeFunctions.htm%3FTocPath%3DReference%7C____...

 

Scrolling down to the "Date/Time Format Flags" section it states:

 

...The year format specifier (both %y and %Y) can read either two or four digit years. Two digit years are always given "20" as the century. Therefore, a two digit year of "99" will translate to "2099", not "1999"....

 

However, I have found that 2-digit years are not always given the "20" century. I have noticed that 00 to 50 are given the "20" century i.e. assigned as 20XX. But 51 to 99 are given the "19" century i.e. assigned as 19XX. Please see attached workflow where I run both Date Time Tool and DateTimeParse functions on a couple of 2-digit year dates (using both %y and %Y specifiers and get same results each time).

 

Please can my observations be confirmed and if this is indeed true could the help page please be corrected?

 

Thanks so much.

 

Yusuf

4 REPLIES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus

@YK_dup_378,

 

I concur.

 

Cheers,

Mark

 

@JessicaS

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
JessicaS
Alteryx Alumni (Retired)

Hi @MarqueeCrew and @YK_dup_378,

 

Thanks for reporting this.  I agree as well and will forward on to the relevant teams at Alteryx.  

 

I'll circle back to provide an update as soon as we have one.

 

Thanks!

Jess Silveri
Manager, Technical Account Management | Alteryx
JessicaS
Alteryx Alumni (Retired)

Hello,

 

I checked with our documentation team and it looks like they made an update in the most recent documentation around this parameter.

 

If you reference this link they have updated it to show:   Two digits are mapped to a range of the current year minus 66 to current year plus 33. (For example, in 2016, that's 1950 to 2049.)

 

2017-09-15_13-53-13.jpg

 

Sorry for the confusion caused here, please let me know if this clears it up or if there is any further detail we can provide

 

Thanks,

Jess Silveri
Manager, Technical Account Management | Alteryx
YK_dup_378
7 - Meteor

Hi Jessica,

 

Great! Thanks very much for the update.

 

So how 2-digit year dates get mapped is dependent on the current year you are working in. Mapped dates would range from current year -66 to current year + 33 e.g. if the current year was 2066 then 2-digit year dates would all be given the "20" century. Got it!

 

In regard to the help link you included in your reply - https://help.alteryx.com/current/index.htm#Reference/DateTimeFunctions.htm

is this the most current link I should be referencing for Alteryx help? I will get rid of earlier link I have been using.

 

Thank you again. And thanks to @MarqueeCrew for forwarding my post along to you.

 

Cheers,

 

Yusuf

 

 

 

 

Labels