Forum Discussion
Cannot convert null to timestamp
- 5 years ago
@ericOnline, try how
if [unixTimestampColumn] is null, then null else #datetime(1970, 1, 1, 0, 0, 0) + #duration(0, 8, 0,[unixTimestampColumn]/1000)
UPDATE1:
- I first replaced all nulls with 0. Thid did not work.
- I then replaced all nulls with 000000000000 and even though the column still showed "0", the conversion worked.
NEXT QUESTION:
- I now have a bunch of values with 1/1/1970 (the beginning of Unix epoch).
- What are some ideas for hiding these values in the visualization?
- For example: I don't want the user to see "1/1/1970" as an option in any date slicers.
(Reminder: I can't just drop these records because other columns are critical).
Thank you
@ericOnline, try how
if [unixTimestampColumn] is null, then null else #datetime(1970, 1, 1, 0, 0, 0) + #duration(0, 8, 0,[unixTimestampColumn]/1000)