Forum Discussion

amtanner's avatar
amtanner
Regular Visitor
10 years ago
Solved

Date Separation - separating dates from timestamps

The data that I am using is importing as the following form "MM:DD:YYYY 00:00:00 __". (For example, "10/1/2015 12:00:00 AM".) I am not sure why it is doing this because the source of the data is simply in MM:DD:YYYY format. (I am importing this data from a SharePoint site, FYI.) How do I separate the date (MM:DD:YYYY) from the timestamp on the right side (00:00:00 __)? In the end, I am trying to zero in on the year, month, and quarter using a fiscal calendar but am unable to create the relationship between that calendar and the dates because of the timestamp attached. Suggestions?

  • Edit your query, select your column, go to the Transform tab and change the "Data Type" to Date instead of Date/Time.

4 Replies

  • v-sihou-msft's avatar
    v-sihou-msft
    Microsoft Employee

    amtanner

     

    Or you can use Format() function to remove the timestamp part.

     

    Column = FORMAT(Table[date],"MM-DD-YYYY")

    Regards,

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you!  This is exactly what I was looking for and is simple.

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Edit your query, select your column, go to the Transform tab and change the "Data Type" to Date instead of Date/Time.

  • Anonymous's avatar
    Anonymous
    Not applicable
    Column = Table[date].[Date]