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

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
TonyHansson
Frequent Visitor

Change date and time

Hi

 

I have a column with a date and time.

 

I need to keep the date, but change the time to always be 15:00

 

I have tried different but no luck.

 

Custom column = Date.From([#"Column"]) + #duration(0,15,0,0)

 

Regards

 

Tony

 

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

You could try constructing a datetime and hardcoding the time .

Here's a start:

#datetime(Date.Year([Column1]), Date.Month([Column1].....

View solution in original post

3 REPLIES 3
AlexisOlson
Super User
Super User

You could also use DateTime.ToText and DateTime.FromText like this:

DateTime.FromText(DateTime.ToText([Column], [Format="yyyy-MM-dd 15:00:00"]))

 

TonyHansson
Frequent Visitor

Hi @HotChilli 

 

Worked perfect Thank you

 

#datetime(Date.Year([#"M&P deadline"]),Date.Month([#"M&P deadline"]),Date.Day([#"M&P deadline"]),15,00,00)

HotChilli
Super User
Super User

You could try constructing a datetime and hardcoding the time .

Here's a start:

#datetime(Date.Year([Column1]), Date.Month([Column1].....

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors