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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
ashokpasumarthi
New Member

HardCoded date to datatype Date conversion using dax.

I am looking to convert a hardcoded date ex : "1900-1-1" to datetime. How can i do it using dax. Basically I am using something like below.

 

IF(Condition,table(column)(datetime) ,"1900-1-1")

I am getting error because 1900-1-1 is considered as text and my true condition column in IF is datetime. How to handle this in DAX ? Thanks for looking 

1 REPLY 1
Anonymous
Not applicable

hI,

 

USE FORMAT function in dax to achieve your goal. however, you can use Edit quries (on the top tab)

and then in there, select the column you like to change the data type and then go to tansform (on top tab).

there you will find a option called data type. change this you either Date/Tine or Date according t your requirement

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors