Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Removing Time stamp from date

I have a formula 

"Week of Due Date = "Week of" & " " & 'BAH Task Tracker'[Due Date] - WEEKDAY('BAH Task Tracker'[Due Date],2) + 1"
that returns the first day of each week after the words "Week Of" but sone of the dates include a time a well. Out of about 1000 rows it only appears to happen to ~5 of them. 
 
is there a way to remove the time?
 
thanks 
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

    Please try the following methods and check if they can solve your problem:

    1.Ensure that the date part is considered, removing the time component.

     

    2.Try the following DAX formula.

    Week of Due Date = "Week of" & " " & FORMAT('BAH Task Tracker'[Due Date] - WEEKDAY('BAH Task Tracker'[Due Date],2) + 1, "dd/mm/yyyy")

     

    Best Regards,

    Wisdom Wu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Anonymous's avatar
    Anonymous
    2 years ago

    This solved my issue! Thank you so much!

4 Replies

  • Daniel29195's avatar
    Daniel29195
    Community Champion

    Anonymous 

    in powr query, change datatype yo date instead of datetime .

    if you need the time, in other reports, then create a duplication of this column, and leave it as datetime, 

    and the original one you can change its datatype to date . 

     

    hope this helps .

     

     

    If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

    • Anonymous's avatar
      Anonymous
      Not applicable

      that did not work for me. I removed the wording "Week of" and then I changed the datatype to date, but once I added the wording back in there were still several instances of the time

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Please try the following methods and check if they can solve your problem:

    1.Ensure that the date part is considered, removing the time component.

     

    2.Try the following DAX formula.

    Week of Due Date = "Week of" & " " & FORMAT('BAH Task Tracker'[Due Date] - WEEKDAY('BAH Task Tracker'[Due Date],2) + 1, "dd/mm/yyyy")

     

    Best Regards,

    Wisdom Wu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      This solved my issue! Thank you so much!