Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two columns in my QVD, country and date. I am persisting my data into a straight table, now I want to have the format of the date to be dependent on the country value of that row. How is this best achieved?
Using the if clause to derive the value in edit script
using calculated dimension to derive the format of the date
using an expression
P.S.: There are around 10 date columns present which are supposed to be formatted
@SailajaPulugurtha can you share a sample data and the expected output ?
Hi, attaching the sample data
I am receiving data as YYYY-MM-DD from the source system. Now in the front end I have to display that in different formats in a straight table based on the country value.
Attaching sample data with the result I am getting now and the expected one.
I have taken a calculated dimension as
the output of this is behaving wierdly.
=if(COUNTRY='US',Date(DraftDate1,'MM/DD/YYYY'),Date(DraftDate1,'DD/MM/YYYY'))
@SailajaPulugurtha =if(COUNTRY='US',Date(DraftDate1,'MM/DD/YYYY'),Date(DraftDate1,'DD/MM/YYYY')) works too, or you can use Pick if there is a lot of format :
=PICK(MATCH(COUNTRY,'UK','US','AU','DE','ES','FR','IE'),
Date(DraftDate1,'MM/DD/YYYY'),Date(DraftDate1,'D/M/YY'),Date(DraftDate1,'DD/MM/YYYY'),Date(DraftDate1,'MM/DD/YYYY'),Date(DraftDate1,'MM/DD/YY'),Date(DraftDate1,'DD/MM/YYYY'),Date(DraftDate1,'DD/MM/YY'))
or in the Script you can use Mapping load to change format based on country