Solved

SQL Reporting Services - Supply values to DateTime parameter

Posted on 2008-06-20
2
1,737 Views
Last Modified: 2008-06-25
I have a query which is supposed to supply default values to Date_From and Date_To parameters for a report query.

The SELECT statement below provides date in the format YYYY/MM/DD , apparently this is not the format expected by the DateTime parameter.

What is value would DateTime be looking for?
0
Comment
Question by:egxis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
psychic_zero earned 250 total points
ID: 21829540
I think the format it looking for is in format MM/DD/YYYY HH:MM:SS AM
eg. 6/20/2008 5:40:10 PM
0
 
LVL 15

Assisted Solution

by:rob_farley
rob_farley earned 250 total points
ID: 21829558
Try using the format YYYYMMDD - without the slashes. Almost everything else is location-dependent.

If that still doesn't like it, try:

select cast('20080620' as datetime)

...to force it to evaluate it as a datetime, rather than a string.

Rob
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question