Forum Discussion

theglamgamer's avatar
theglamgamer
Regular Visitor
3 years ago
Solved

convert date text to data type date using DAX

Having issue converting this date text to data type date: 

  
Feb 3, 2021 12:00:00 EST

I tried using Date Format = DATEVALUE and 
DATEVALUE(FORMAT(Details[Plugin Modification Date],"MMM/DD/YYYY HH:MM:SS EST"))

I created a new column to test those 2 functions but get a text couldn't convert to date type error
  • tamerj1's avatar
    tamerj1
    3 years ago

    theglamgamer 

    Column = CONVERT ( LEFT ( 'Table'[Date], 12 ), DATETIME )

     

     

    Also DATEVALUE + LEFT should work

    Column = DATEVALUE ( LEFT ( 'Table'[Date], 12 ) )

     

     

     

3 Replies

      • tamerj1's avatar
        tamerj1
        Icon for Community Champion rankCommunity Champion

        theglamgamer 

        Column = CONVERT ( LEFT ( 'Table'[Date], 12 ), DATETIME )

         

         

        Also DATEVALUE + LEFT should work

        Column = DATEVALUE ( LEFT ( 'Table'[Date], 12 ) )