Alteryx Designer Desktop Discussions

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

Leading zero's missing in month field ? how to fix it

sathyar
8 - Asteroid

IF DateTimeMonth([DummyField]) >= 7 THEN DateTimeMonth([DummyField]) - 6
ELSE DateTimeMonth([DummyField]) + 6
endif

 

By using this expression in formula tool working fine but leading zero's in month fields are missing , if it's for 7 month it should be like 07 but giving the values of 7 .

 

Thanks in advance 

5 REPLIES 5
caltang
17 - Castor
17 - Castor

Please provide relevant data to this use case, and kindly provide your criteria in as much detail as possible. If you have a workflow built halfway, kindly export that over as well. To export a workflow go to: Options > Export Workflow. Kindly do NOT send a "Save As" copy.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
sathyar
8 - Asteroid

Here you can see the Fiscal Month field in last formula tool .

Qiu
21 - Polaris
21 - Polaris

@sathyar 
Since your "Fiscalmonth" field is a numeric field, the leading zero is removd natually.

If you insist on having 2 digit for the month number, we have to turn it to string then use the function of PadLeft as below.

Date_Task.PNG

sathyar
8 - Asteroid

FiscalMonthOfYear

FiscalQuarter

FiscalYearMonth

FiscalYearQtr these 4 fields should be come in the format mentioned below .

1, 2, …, 12
1, 2, 3, 4
FY2004-01
FY2004Q1

 

There is the issue i am facing .

sathyar
8 - Asteroid

Cloud you please look at the fiscal year column since i couldnt able to get the proper date starting before  2021-07-01 showing 2021 fiancial year.

 

since i am attaching the below workflow to get the right forumla .

Labels