Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Change Int64 to Date Format only for Day

Hi, any idea how I can change an int64 value to a date format? I just want to change the day of the month, which is an integer value in a separate column, to a date format.

 

Thanks!

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

I think you can change the data type of a numeric column to a Date and it should do the conversion. But, the result will depend on the reference date for your source. If you know the reference date you could do this: 

 

New Date = (DATE(<reference date in year, month, day>) + [Numeric Date]) * 1.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Multiple ways have been provided above but can you show some sample data and the expected result you want to us? So that we can check if the solution is work for you.

 

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Greg_Deckler
Super User
Super User

I think you can change the data type of a numeric column to a Date and it should do the conversion. But, the result will depend on the reference date for your source. If you know the reference date you could do this: 

 

New Date = (DATE(<reference date in year, month, day>) + [Numeric Date]) * 1.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
FrankAT
Community Champion
Community Champion

Hi,

I think you can use the DATE() function like this: DATE(year, month, [Day column])

or are you looking for something like in the figure?

 

05-03-_2020_15-25-08.png

 

Regards Frank AT

Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

you can use Date.From()

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.