Power Query Date format issue - excel

I use Powerquery to extract from database using sql, when i am in the editor it displays normal, but when i close and load, the format changes to a strange format
Example
in powerquery editor window display is 6/28/2021 5:21:38pm
in excel it changes to 44200.68331
so everytime i have to manualy change the format back.
anyone know what date format this is, and how i can have it automatically save the format from the editor screen to excel?enter image description here
thanks in advance

Related

Exported date format not recognised in excel as date (Angular)

So I am exporting some information as excel document.
The issue I'm facing is that in Excel the actual data field containing the date is recognised as general data and I would like it to be recognised as Date.
If I double-click on the date field and click outside of it, only then it will convert it to Date.
Image1
Image2
The first 2 fields in the second image are Date format(after double-clicking on them).
How can I make this by default so the user will have the data as Excel Date without having to do anything.
This is how I am formatting the date to my requirments:
item.documentDate = new Date().toLocaleDateString('en-US');
Any help is appreciated. Thanks

Excel VBA format

i have a sheet where i connect to SQL. how can i create vba where every time i click refresh data connection query from power query, it will convert my text to number. Once it convert, i would like to format it to percentage and some are in accounting format. Upon refresh again, the same format will stick as it is without need to click format again. Is this possible?
Yes, it is possible, by using onChange event in VBA:
https://learn.microsoft.com/en-us/office/vba/api/excel.worksheet.change

SSRS TimeStamp incorrect format when exported to Excel

I have a datetimestamp field in SSRS, when I preview the report the data looks okay (2015-06-23 1:33:00 PM), but when I export the report to excel it creates ############### and not showing the date time. The dataset is done in SQL query cast(m.CallTime as datetime). What I want to happen is to display just the time in SSRS and Excel (1:30 PM). Thanks.
I've always had issues with the Excel export with date formats but I think that's more due to Excel propensity to guess wrong at the format I want. Why is it whenever I have a date with no time, it usually is formatted as time only (0:00)? Very annoying.
Make sure that your date is in a date format. You casted it in your query but you could also use CDATE to do it in SSRS.
Set the format using the Textbox's FORMAT Property to hh:mm tt .
It should come out as specified in Excel.

How to set Excel date with text in a single cell with dateformats

I have an excel report which is generated from the web application.
In that report I need to place "(01/25/2013) Control", it's getting from a database query. I can't change the database query.
I want to change the date format as dd/mm/yyyy with including text like "(25/01/2013) Control", but my query gives date in mm/dd/yyyy format.
Please help me regarding above one.
One option would be to format the cell in the following way
Custom Number Format
"("dd/mm/yyyy") Control"

Using Reporting Services Excel data spreadsheet shows ####

When I export my rdl file to excel the date/time shows up as ######. I researched it and it said to make the columns wider. I got it to work but im on the edge of the page. When I export to pdf everything is messed up because of the width. Is there another way to stop the excel spreadsheet data from showing up as #### other than widening the columns?
"How come other text fields are able to go to the next line but the date/time cant in excel?"
Try converting the datetime to string:
=CStr(Format(Fields!Target_Date.Value,"dd-MM-yyyy hh:mm:ss"))
Make sure the format of the textbox is set to 'General', or the Format property is blank.
This will allow the date and time to wrap in the textbox. The downside is excel now thinks this date is a string, which if there is to be no further manipulation of this, should not cause an issue.

Resources