ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. 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

Date (at the day level e.g 1/1/2019, 1/2/2019)

vpalani08
6 - Meteoroid

Convert to start of month as Date data type. Because I have other sheet with date as 1/1/2019 includes all the sum of values of the month.
So, If i can convert my other sheet with same start of month as data type I can join them both.
Can anyone help me with it?

6 REPLIES 6
apathetichell
20 - Arcturus

are they currently in datetime format? if so:

datetimeadd([Field1],-tonumber(datetimeformat([Field1],"%e"))+1,"days")

 

will get you the first of the month in formula.

vpalani08
6 - Meteoroid

No just the Date Format. 
I have values in all date from 01/01/2019 to month end 01/31/2019. I need to get the cumulative sum of all the values across only first day of month 01/01/2019.

vpalani08_0-1619199819284.png

 



apathetichell
20 - Arcturus

Yeah - my formula will generate firsts of the month for dates.

vpalani08
6 - Meteoroid

Sorry the Unit Date Column is in V_String type

vpalani08
6 - Meteoroid

It worked I have to change the data type.

apathetichell
20 - Arcturus

you can convert with a datetime tool or use this formula:

datetimeparse([test],"%m/%d/%Y")

 

if you want to keep it as a string (for some reason) and just do a manual convert to the first of the month you can use a regex replace like this:

REGEX_Replace([test], "(\d+)/\d+/(\d+)","$1/01/$2")

 

Labels
Top Solution Authors