SSRS and a stuborn Excel Serial Date - reporting-services

Sorry Guys, I need some help doing this for a datefield in SSRS. I have a spreadsheet that I export as an xml file, then use that xml as a datasource for my dataset in SSRS. The field for the date comes through as 42969 instead of a Date 22/08/2017. I am not sure how to convert this in ssrs to a date using an expression. Does anyone have an idea?

You can convert this quiet simply but as the data has come from Excel you need to adjust the date by 2 (Excel and SSRS/VB.NET treat serial dates differently).
The following should work
=DateAdd("d", Fields!MyDateField.Value -2, "1900-01-01")

Related

VB Script ReportBuilder 3.0 Convert String Date to YYYY-MM-DD format

I am creating a cube report using Report Builder but I need to convert the date string so it can sort properly.
Currently the date appears like this "Fri, Apr 13th, 2012" and I need it too look like 2012-04-13 so that it will sort properly.
Can I do both the string formatting and sorting under the Tablix Properties - Sort ?
You don't have to sort by the same format that is displayed in the report. You can either do the sorting in the SQL beforehand or you can sort at the dataset, table, or group level in the report. If the column is a date datatype, you can simply sort by it. As far as the formatting is concerned, if you right-click on the textbox and go to properties, you will see the date formatting options.

MS Access stores the date as 30/12/1899 and not the actual date

whenever I am pushing the data from VBA code to an Access table the date field is stored as 30/12/1899 and not the actual date ? I tried formatting the date to mm/dd/yyyy before writing to the table but no success. Thanks in advance for the help
In VBA you need to use US date format AND surround the date with # signs so today would be
#02/20/2015#

SSRS Espression for String to Date Time format

Hi I have a SQL Stored Procedure to for my SSRS Report.
Below is the query to fetch Date i used.
(CONVERT(CHAR(10), ENTER_DT, 103), '''')
I am not in a position to change this query. The Dat Format currently displayed is "DD/MM/YYYY".
I want to display the date format as Below using SSRS Expressions.
MM-DD-YYYY
Please guide me to do that using SSRS Expresions. PLease help.
Just change the Display Format instead of converting into TSQL (Stored Procedure), Follow the steps go to textBox Properties, Select Number & Category Custom then Custom Format whatever you want

dd/mm/yyyy date format in SSRS

i'm trying to specify dd/mm/yyyy dateformat for date/time parameter in SSRS 2008 R2.
My computers datetime format is mm-dd-yyyy.
My requirement is, i want to show date format at dd/mm/yyyy irrespective of the system/server date format.
I've already tried CDate(Format(Today,"dd/mm/yyyy")) which didn't work. one very strange thing i observed is, it shows dd/mm/yyyy format only for dates on or before 12-MM-yyyy, and 13 onwards it gives error: Conversion from string '25-04-2014' to type Date is not valid. (Possibly it is trying to map 25(daypart) with MM-dd-yyyy (month part)) which is out of range of total months i.e. 12)
my research on internet says it is a bug in BIDS 2008.
What do i do to display date as dd/mm/yyyy ??
I don't have enough reputation to comment, but I did notice that you failed to put "()" after "Today". If I'm not mistaken you must put Today() for that function to work. Also, you might want to try putting CDate Around the Today() function. You shouldn't need it, but it's worth a shot. Also, for some odd reason, in my experience, you must capitalize MM for format to work correctly.
Like #Aditaya said, it should be =format(Today(),"dd/MM/yyyy")
The expression I usually use is:
=FormatDateTime(Fields!Date.Value, DateFormat.ShortDate)
However, this may be region specific.
Rather than writing an expression to do the formatting, you can also use the Textbox Format Property. But first you need to make sure that the data is in a date format. So use the CDate function on your column like this:
=CDate(Fields!Date.Value)
Then in the textbox properties go to the Number tab. Select Date for the category. Then you can select whichever format you want or use a Custom format. This will change how the column displays when you run the report.

MS Excel : How to get the changed date format when exporting as csv?

I have a MS Excel file in which a column contains date in the format m/d/yyyy and mm/dd/yyyy. I wanted all these dates to be imported in to a MySQL table.
So in MS Excel, I changed the cell format to custom date 'yyyy-mm-dd' and everything looked fine in the excel columns. When I exported it as .csv, all dates were in the original format i.e., m/d/yyyy and mm/dd/yyyy but not as 'yyyy-mm-dd'.
Please help me in this regard. Thank you!
Like David mentioned, you may have to replace the text before importing it to the MySQL table. You can try this formula:
=TEXT(A2,"yyyy-mm-dd")
And copy down. Then do a copy->Paste Values into the original date column. Then delete the temporary column with the Text() formula.
Try importing it after you replace the text. It should work out.