Forum Discussion

Saryan's avatar
Saryan
New Member
9 years ago

Date Separation - separating dates from timestamps

i have a table in powerpivot, in that table i have a column (say column name A)which has date and time , now i have added another column(say column name B) where i need to bring the date from column A but the format should be like "MM/DD/YYYY", means i want to get rid of the time and just want the short date to be copied to the B colum, i have tired format(columnA,"MM/DD/YYYY") but it returns the value in date n time format, pleaes let me know if there any DAX founction or formula which i can use to get the date without the time stamp on it.

 

Regards,

Aryan

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Try this:

     

    Column = FORMAT(DATE(YEAR([DateTime]),MONTH([DateTime]),DAY([DateTime])),"MM/DD/YYYY")
  • Eric_Zhang's avatar
    Eric_Zhang
    Microsoft Employee

    Saryan wrote:

    i have a table in powerpivot, in that table i have a column (say column name A)which has date and time , now i have added another column(say column name B) where i need to bring the date from column A but the format should be like "MM/DD/YYYY", means i want to get rid of the time and just want the short date to be copied to the B colum, i have tired format(columnA,"MM/DD/YYYY") but it returns the value in date n time format, pleaes let me know if there any DAX founction or formula which i can use to get the date without the time stamp on it.

     

    Regards,

    Aryan


    Saryan

    It works in my  test, can you confirm that?