logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Ott  
#1 Posted : Tuesday, January 16, 2018 10:29:54 PM(UTC)
Ott

Rank: Member

Groups: Registered
Joined: 6/9/2017(UTC)
Posts: 29
Canada

Thanks: 1 times
I have a data source defined with the following parameters:

Database Type: MS SQL Server
Date Time format: MM/dd/yyyy

Date fields in the Server Manager are defined with the 'Date & Time' data type.

In the Web Report Designer, I created a report with a date field, the 'Short date' format has been specified for that field.

When I generate the report, the dates come out in this format: 2018-01-24 05:00:00.000000

I cant't find a way to get the date in the format I specified (MM/dd/yyyy), and the time is alway included even if I asked for a short date.

Do you have any suggestions as to what I'm missing?
epf  
#2 Posted : Wednesday, January 17, 2018 7:18:35 AM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

Thanks: 14 times
Was thanked: 206 time(s) in 199 post(s)
Well, in the Report Designer:
Default -> take the format specifed in the configuration (Server Manager -> Configuration -> Configure Server...)
Then you have pre-defined format you can use
Then you have Custom that allows you to specify the format you want like MM/dd/yy H:mm:ss zzz

You can have a look at the standard date time patterns (pre-defined):
https://docs.microsoft.c...-and-time-format-strings

Or custom patterns:
https://docs.microsoft.c...-and-time-format-strings

I am surprised that the report comes out always with 2018-01-24 05:00:00.000000, are you sure that the SQL column you query is a real date time ?
Ott  
#3 Posted : Wednesday, January 17, 2018 10:23:15 PM(UTC)
Ott

Rank: Member

Groups: Registered
Joined: 6/9/2017(UTC)
Posts: 29
Canada

Thanks: 1 times
The date field I used for my test is defined as datetime2 data type. The report is in fact reporting the date in the format of that data type regardless of the format I apply to it in the report designer.
epf  
#4 Posted : Thursday, January 18, 2018 7:20:57 AM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

Thanks: 14 times
Was thanked: 206 time(s) in 199 post(s)
Yes, that is probably the problem, I will check the datetime2 for SQL Server and make the fix for future releases....
in your column definition can you convert it to normal datetime: convert(datteime, colName), this should solve the problem.
Users browsing this topic
Guest
Similar Topics
How to use Chart view X-axis with different date format option (General Discussions/Other)
by venky 12/2/2022 9:05:20 AM(UTC)
Oracle Date Format Inconsistencies in Restrictions (Reports)
by Ott 6/9/2021 7:06:19 PM(UTC)
Date Format in Web Report Designer (Reports)
by Ott 3/1/2018 9:03:53 PM(UTC)
oracle connection date format issue (Reports)
by avoolapati 11/12/2015 11:20:38 AM(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.