Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / June 2006

Tip: Looking for answers? Try searching our database.

Datetime Parameter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael van der Veeke - 26 May 2006 03:59 GMT
Hi All,

I have a report with two parameters.  Date1 and date2 and both are of type
datetime.  when I select a date greater than 12/05/2006 the report fails
stating "the value provided for the report parameter Date2 is not valid for
its type".  Now date1 has 01/05/2006 and date2 has 31/05/2006.  For the
format is Australian date format and I have checked my regional settings and
they are set correctly to Australian and I have done the same on the report
server.

What is going on and how do I fix it.....

Thanks

Michael
Wei Lu - 26 May 2006 08:12 GMT
Hi Michael,

Thank you for using MSDN Managed Newsgroup Support.

From you description, my understanding of this issue is: You want to
transfer the date-time parameter in (dd/mm/yyyy) format in to the report.
If I misunderstood your concern, please feel free to point it out.

By default, it's not possible to set the format of the date. However I did
a workaround for you, you can set the parameter data type to string then
use the SQL Convert() function to convert the parameter to DateTime.

The simple example of this will be like this.

Select * from orders where orderDate= CONVERT(DateTime, @mydate, 103)

Here is the article about the CONVERT function.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_
ca-co_2f3o.asp

Hope this will be helpful.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
Signature

This posting is provided "AS IS" with no warranties, and confers no rights.

Martin GC - 29 May 2006 09:42 GMT
Hi Michael/Wei

I have found the exact same problem, here's what we have discovered.

The problem is that RS swaps the month and day.

A start and end date is chosen in the datepicher controls. This is ok, but
when "view report" is activated, RS swicthes day and month and thus it is
considered a invalid date.
A clear example is when you e.g. choose 2006-01-05 in a datepicker control.
When view reports is activated, then the date has changed to 2006-05-01.

As an extra info, the problem is userspecific, we have tried to use
different users from the same computer and the result was ok with obe user
and not ok with another. The dateformat setup was 100 % simular on these
users.

The convert function is not the answer to this problem, instead I find it to
be a really annoying bug that makes the datepicker useless.

As Michael, I really would like the solution to this problem.

Forgive my english :-)

Martin

> Hi Michael,
>
[quoted text clipped - 30 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
Wei Lu - 30 May 2006 07:10 GMT
Hi Martin,

Thank you for your post.

Unfortunately, I could not reproduct this issue on my side. When I click
the datetime picker, it could render the date correctly.

Would you please provide some additional information about the Regional
Settings?

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
Signature

This posting is provided "AS IS" with no warranties, and confers no rights.

Martin GC - 30 May 2006 07:19 GMT
Hi Wei

My settings are as follows:

International settings/Standards and formats = "Danish"
Short dateformat = "DD-MM-YYYY"
Dateseperator = "-"

If you have an email I would be happy to send some screensdumps.

Sincerely,

Martin

> Hi Martin,
>
[quoted text clipped - 18 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
Wei Lu - 30 May 2006 09:33 GMT
Hi Martin,

My direct email address is weilu@ONLINE.microsoft.com (Please remove the
ONLINE before you send the email).

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
Signature

This posting is provided "AS IS" with no warranties, and confers no rights.

MJT - 30 Jun 2006 17:25 GMT
Hi Wei Lu -
 I notice that you respond to certain posts "welcome to MSDN managed
newsgroup support"  - how can I get this same assistance?  I am an MSDN
subscriber - is there some special way to post a question to get your
attention?  I am wondering how I can set a default date of TODAY in RS2005
when I have a date parameter set as datetime.  I want to provide a default
value of current date.  Cant seem to get it working without getting a type
incorrect when I use a function like TODAY or NOW.  Thanks in advance!

> Hi Martin,
>
[quoted text clipped - 13 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.