Forum Discussion
Anonymous
4 years agoNot applicable
Build a valid date with DATE function (dd.mm.yy)
Dear all, I have some issues with building a valid date from this source: I have tried: DATO = DATE(TRLO[TRL_DAG], TRLO[TRL_DMND], TRLO[TRL_AAR]) I guess the formula fails because of ...
- Anonymous4 years ago
Hi Anonymous ,
30 in the TRLO[TRL_DAG] stands for 2030, right?
Adding two digits to 2000 turns it into a four-digit year.
DATO = DATE(2000+TRLO[TRL_DAG], TRLO[TRL_DMND], TRLO[TRL_AAR])Then you can change the format you want.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Tahreem24
4 years agoSuper User
Anonymous Try this DAX Column:
Date Column = FORMAT(DATE(DateTable[Year],DateTable[Month],DateTable[Day]),"dd.mm.yy")
- Anonymous4 years agoNot applicable
Thank you very much.
I tried:
DATO = FORMAT(DATE(TRLO[TRL_DAAR], TRLO[TRL_DMND], TRLO[TRL_DAG]), "yy.mm.dd")
and this one too:I still get error message (in english like this): One argument in function DATE has wrong data type, or the result is too big or too small.DATO = FORMAT(DATE(TRLO[TRL_DAAR], TRLO[TRL_DMND], TRLO[TRL_DAG]), "dd.mm.yy")
Best regards
Kenneth Pedersen- Tahreem244 years agoSuper User
Anonymous Make sure all Year, Month, and Day columns are of type interer or whole number. They should not be a text column.