Forum Discussion
Anonymous
3 years agoNot applicable
convert string to datetime
Hi, I have a table like this :
I need to convert the string to a datetime . The row 52 should be 06/09/2020 01:00:00, row 53 = 06/09/2020 02:00:00. So I can plot a series time by hour based on days. Is it possible?
Thanks in advance!
Anonymous
you can try this
Column = VAR _date=date(left('Table'[hourofday],4),mid('Table'[hourofday],5,2),mid('Table'[hourofday],7,2)) VAR _time=time(right('Table'[hourofday],2),0,0) return _date+_timeyou are welcome
3 Replies
- ryan_mayuSuper User
Anonymous
you can try this
Column = VAR _date=date(left('Table'[hourofday],4),mid('Table'[hourofday],5,2),mid('Table'[hourofday],7,2)) VAR _time=time(right('Table'[hourofday],2),0,0) return _date+_time - AnonymousNot applicable
ryan_mayu . Thanks a lot! It worked perfect!
- ryan_mayuSuper User
you are welcome