Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a date which is in this format YYYY-MM-DD 00:00:00.00000 and I would like to use this date in X axis format like this Jan-2022,Feb-2022,Mar-2022,Apr-2022,May-2022,Jun-2022,Jul-2022,Aug-2022,Sep-2022,Oct-2022,Nov-2022,Dec-2022,Jan-2023,Feb-2023...etc. like this. Can some one help me with code how to achieve this?
Example:
StartDate: 2022-04-30 00:00:00.00000, 2022-06-30 00:00:00.00000, 2022-02-10 00:00:00.00000...etc
And I wanted start date like this Jan-2022,Feb-2022,Mar-2022,Apr-2022,May-2022,Jun-2022,Jul-2022,Aug-2022,Sep-2022,Oct-2022,Nov-2022,Dec-2022,Jan-2023,Feb-2023..
Thanks in advance!
Date(MonthStart(Date#(StartDate, 'YYYY-MM-DD hh:mm:ss.fffff')),'MMM-YYYY') as StartMonth
@pinky1234 Please use the below expression in the back end:
NoConcatenate
Temp:
Load Date(Monthstart(Timestamp#(Date,'YYYY-MM-DD hh:mm:ss.fff')),'MMM-YYYY') as Date
Inline [
Date
2022-04-30 00:00:00.00000
2022-06-30 00:00:00.00000
2022-02-10 00:00:00.00000
];
Exit Script;
This should resolve the issue.
Hi,
Thanks for Reply!
The issue that I am facing here is after converting start date to MMM-YYYY format, I wanted to use start date as x axis for bar chart and sort the dates in sequence in order. Jan-2022,Feb-2022,Mar-2022,Apr-2022,May-2022,Jun-2022,Jul-2022,Aug-2022,Sep-2022,Oct-2022,Nov-2022,Dec-2022..etc. Can you help me to achieve this?
Hi,
Thanks for Reply!
The issue that I am facing here is after converting start date to MMM-YYYY format, I wanted to use start date as x axis for bar chart and sort the dates in sequence in order. Jan-2022,Feb-2022,Mar-2022,Apr-2022,May-2022,Jun-2022,Jul-2022,Aug-2022,Sep-2022,Oct-2022,Nov-2022,Dec-2022..etc. Can you help me to achieve this?
Hi
By default, date has number format. so we can sort by asc or desc.
Try to Change the sorting order in the bar chart.
That should be default behaviour given this MonthYear field.
Can you please post screenshots that show your settings as well as your current result being sorted other than expected.
thanks