Forum Discussion
suvechha
6 years agoHelper IV
Convert bigint to datetime
Hi there, How can I convert bigint datatype to date/time datatype in Power BI ? Thanks
- 6 years ago
Hi suvechha ,
If it is timestamp, maybe you could try this as well in Query Editor.
DateTimedValue=#datetime(1970,1,1,0,0,0)+#duration(0,0,0,[timestamp])If it is formated as yyyymmdd, you could try this in Data View:
column = DATE(LEFT('Table 1'[Column1],4),MID('Table 1'[Column1],5,2),RIGHT('Table 1'[Column1],2))
edhans
6 years agoCommunity Champion
bigint isn't a date time field, it is an integer. Need to know what is in the integer. If it is the YYYYMMDD format, then there are a lot of ways to convert, but:
Date.FromText(Text.From([BigIntField]))
is the easiest and most straight forward way.
It could also be a Julian date (common in IBM databases), or Unix Epoch, or other. We'd need to know more as there isn't just one date format stored in integer fields.