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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
PaulTHR
Frequent Visitor

I have Year integer only - how to turn that Year to a dd/mmm/yyy

Hi - I have Year integer only (ie 2021) - how to turn that Year to a dd/mmm/yyy by making is say 1st date of year so all my years ared like 2020, 2021 etc turn into 01/01/2020, 01/01/2021 etc. Pref in Power Query.

 

any ideas ? thanks

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

Select that column - Transform menu - Data type - date

1.png

See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMlCK1QEzDGEMIzDD0NLSUik2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Year = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Year", type date}})
in
    #"Changed Type"

 

View solution in original post

2 REPLIES 2
Vijay_A_Verma
Super User
Super User

Select that column - Transform menu - Data type - date

1.png

See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMlCK1QEzDGEMIzDD0NLSUik2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Year = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Year", type date}})
in
    #"Changed Type"

 

Excellent - thanks very much

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors