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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
mitiefjn
Frequent Visitor

Export to excel date always includes time

Using PBI Desktop, I have a report with several date columns, however, even though I set the Data Type to Date (without time) and the Format to my desired Date setting, when I import the CSV file into Excel the dates always appear with a time included. 

 

Is there a genuine way or format to stop this ?

 

Thanks and regards

Fred

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@mitiefjn,

There are two methods for you.

1. Change the data type of the date column to Short Date in Excel file.
1.PNG

2. Create a calculated column in Power BI Desktop using DAX below, then export visual to csv.

Date= FORMAT(Table1[DateCol],"mm/dd/yyyy")

1.PNG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
jthomson
Solution Sage
Solution Sage

Hi,

 

Running across this same bug right now, I don't suppose anyone's found a simpler way to have a date field actually be a date field on export other than using the clunky method of making a bunch of calculated columns?

v-yuezhe-msft
Employee
Employee

@mitiefjn,

There are two methods for you.

1. Change the data type of the date column to Short Date in Excel file.
1.PNG

2. Create a calculated column in Power BI Desktop using DAX below, then export visual to csv.

Date= FORMAT(Table1[DateCol],"mm/dd/yyyy")

1.PNG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Is there a way to represent these values in the format "d mmm yyyy"? It seems not, because the date is turning to text this way. Are there some workarounds?

OK but what if you're in direct query mode? I'm sorry, but this is not a good solution. If we set the format in Power BI, it's not unreasonable to expect that the format would also be applied to the export.

Hi Lydia,

 

Thanks for that, yes, the Excel option is what I've already used, but wondered if there was a PBI setting I was missing. 

 

I'm new to PBI, so, given that I'm extracting 6 different MSProject date fields (columns), I presume I'd need to define 6 different date entries, one for each, for the PBI solution ?

 

If that is so, I'll stick with the Excel option as it's quicker, just a shame that PBI doesn't honour the format settings when exporting.

 

Regards

Fred

@mitiefjn,

Yes. You would need to create 6 columns to convert the date columns to text format.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks Lydia, in that case I'll stick to the Excel method until/if the export process is tidied up

 

Regards

Fred

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.