Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I have some data beginning on 1/1/2019 at 00h00. That date and time are given the number 1. The next data point is at 1/1/2019 at 01h00 associated with the number 2, and so on.
I'm looking for a way to convert each number associated with a date and time to the real date and time.
Does anyone have an idea?
Thanks
Solved! Go to Solution.
HI @jtc ,
Did you means you have list of number records, their have a initialization datetime and these numbers means to hour number and you want to convert them to datetime format based on initialization and offset?
If this is a case, you can add a calculate column with below formula to achieve your requirement:
Datetime =
VAR init =
DATE ( 2019, 1, 1 )
VAR offsetDay =
INT ( ( [Value] - 1 ) / 24 )
VAR offsetHour =
MOD ( [Value] - 1, 24 )
RETURN
DATE ( YEAR ( init ), MONTH ( init ), DAY ( init ) + offsetDay )
+ TIME ( offsetHour, 0, 0 )
Regards,
Xiaoxin Sheng
HI @jtc ,
Did you means you have list of number records, their have a initialization datetime and these numbers means to hour number and you want to convert them to datetime format based on initialization and offset?
If this is a case, you can add a calculate column with below formula to achieve your requirement:
Datetime =
VAR init =
DATE ( 2019, 1, 1 )
VAR offsetDay =
INT ( ( [Value] - 1 ) / 24 )
VAR offsetHour =
MOD ( [Value] - 1, 24 )
RETURN
DATE ( YEAR ( init ), MONTH ( init ), DAY ( init ) + offsetDay )
+ TIME ( offsetHour, 0, 0 )
Regards,
Xiaoxin Sheng
Thank you @Anonymous ,
It's exactly that.
Best regards
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 102 | |
| 79 | |
| 57 | |
| 51 | |
| 46 |