Forum Discussion
i_stanescu_ro
Helper I
2 years agoChange number into date
Hi guys
I have a column with numbers with this format:
19990927
I need to change it to a date format, like this: 09.27.1999 or 27.09.1999 or something like this..
Can I pls ask for your help?
Thanks so much for your time!
try this in calculated column,
New Date (Calculated Column) = VAR _year = LEFT(Test[Date],4) VAR _month = MID(Test[Date],5,2) VAR _day = RIGHT(Test[Date],2) VAR _date = DATE(_year,_month,_day) RETURN _date
4 Replies
- Fowmy
Super User
i_stanescu_ro
Create a calculated column, suppose your data is in a column called TextDatavar __Date = TABLENAME[TEXTDATA] return DATE( INT(LEFT(__Date,4)) , INT(MID(__Date,5,2)) , INT(RIGHT(__Date,2)) )- i_stanescu_ro
Helper I
Thanks so much!
- Arul
Super User
try this in calculated column,
New Date (Calculated Column) = VAR _year = LEFT(Test[Date],4) VAR _month = MID(Test[Date],5,2) VAR _day = RIGHT(Test[Date],2) VAR _date = DATE(_year,_month,_day) RETURN _date- i_stanescu_ro
Helper I
Thanks so much!