Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, can you help me please?
I have the string field "endDate",
That contains values as "01/02/2025".
I need to convert this string to date, how can I do that?
Date(Date#(endDate, 'MM/DD/YYYY'), 'MM/DD/YYYY')
I think not worked,
I need something like this:
Hi @FelipeDenani,
Are you from Brasil?
Try the code below in your Load Script. I'm assuming your code is in the MM/DD/YYYY format:
MyRecords:
LOAD
endDate,
Date(MonthStart(endDate),'YYYY-MMM') AS endDateFormatted
;
Load
Date#(endDate,'MM/DD/YYYY') AS endDate
Inline [
endDate
01/02/2025
02/08/2025
03/12/2025
04/22/2025
];
This is the result:
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Hi Mark, yes I'm from Brazil.
Not worked, I'm using Qlik in Sailpoint interface.
Legal, também sou! Vou responder o tópico em inglês pra não ficar muito estranho rs.
// ***************
Ok so, you have at least two options:
a) Create a Calculated Dimension - like you are doing
b) Add an extra field or change in your Load Script the existing endDate field (recommended)
Option A: Calculated Dimension
Use this expression instead of the one that I sent to you:
=Date(MonthStart(Date#(endDate,'MM/DD/YYYY')),'YYYY-MMM')
Option B: Change the Load Script (recommended)
It is recommended to avoid Calculated Dimensions for multiple reasons. So, when possible, is recommended to change your application Load Script.
Use my code as reference to modify your Load Script - my code is not the final solution, but a reference. You can add a new field - like in my example where I have added endDateFormatted field - or you can change the expression that calculates your endDate field.
Please let me know if that helps.
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Opa aí sim, muito prazer!
Obrigado, vou tentar aqui. Amanhã retorno com updates.
Thank you!