The reports I am creating in a VS2005 Business Intelligence Project
have DateTime parameters. To preview reports, after the parameters have
been entered in "Preview" tab, the "View Report" button has to be
clicked.
It looks to me that whenever the "View Report" is cliked, it causes
"datetime" parameter boxes to re-oder the dates so that "mm" and "dd"
values are interchanged.
For instance, if I enter "12/02/2006" (meaning Feb 02, 2006, in
Australian format ie. dd/mm/yyyy) and click "View Report" button, the
datatime parameter is rearranged as "02/12/2006", and consequenly
producing data for Dec 02, 2006.
Strangely, If I click "view report" again, it interchanges "dd" and
"mm" values again resulting the date I originally intended and produces
the correct report. Clicking "View Report" again causes "dd" and "mm"
to interchange, and so on it goes.
If I enter "20/02/2006" in the datetime parameter box, and click "View
Report" button, I get an error message about incorrect datetime format.
"An error occured during local report processing. The value provided
for the report parameter 'dtStartDate' is not valid for its type".
So, it appears that VS2005
* expects me to input datetime as "mm/dd/yyyy" format,
* rearranges "mm" and "dd" to "dd/mm/yyyy" format (whenever "View
Report" button is clicked) before passing the parameters to the stored
procedures.
I have set the report's "Language" property to "Australia", and WinXP's
language to "Australian English"
Any suggestions and workarounds are greatly appreciated.
Thanks
SurOne thing you can do is to change the parameter type to string, where you can
control the string format of the date... The down side to this is that you do
NOT get the Date-picker window...
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"suranga.suranga@.gmail.com" wrote:
> The reports I am creating in a VS2005 Business Intelligence Project
> have DateTime parameters. To preview reports, after the parameters have
> been entered in "Preview" tab, the "View Report" button has to be
> clicked.
> It looks to me that whenever the "View Report" is cliked, it causes
> "datetime" parameter boxes to re-oder the dates so that "mm" and "dd"
> values are interchanged.
> For instance, if I enter "12/02/2006" (meaning Feb 02, 2006, in
> Australian format ie. dd/mm/yyyy) and click "View Report" button, the
> datatime parameter is rearranged as "02/12/2006", and consequenly
> producing data for Dec 02, 2006.
> Strangely, If I click "view report" again, it interchanges "dd" and
> "mm" values again resulting the date I originally intended and produces
> the correct report. Clicking "View Report" again causes "dd" and "mm"
> to interchange, and so on it goes.
> If I enter "20/02/2006" in the datetime parameter box, and click "View
> Report" button, I get an error message about incorrect datetime format.
> "An error occured during local report processing. The value provided
> for the report parameter 'dtStartDate' is not valid for its type".
> So, it appears that VS2005
> * expects me to input datetime as "mm/dd/yyyy" format,
> * rearranges "mm" and "dd" to "dd/mm/yyyy" format (whenever "View
> Report" button is clicked) before passing the parameters to the stored
> procedures.
> I have set the report's "Language" property to "Australia", and WinXP's
> language to "Australian English"
> Any suggestions and workarounds are greatly appreciated.
> Thanks
> Sur
>|||I had what sounds very like this problem as described in an earlier thread.
If it is the same problem, it should not occur when reports are deployed to
the report server. For me, it only occurs in development.
Ed Allison
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:F8583B54-267B-40F7-B105-D450934E8F53@.microsoft.com...
> One thing you can do is to change the parameter type to string, where you
> can
> control the string format of the date... The down side to this is that you
> do
> NOT get the Date-picker window...
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> I support the Professional Association for SQL Server ( PASS) and it''s
> community of SQL Professionals.
>
> "suranga.suranga@.gmail.com" wrote:
>> The reports I am creating in a VS2005 Business Intelligence Project
>> have DateTime parameters. To preview reports, after the parameters have
>> been entered in "Preview" tab, the "View Report" button has to be
>> clicked.
>> It looks to me that whenever the "View Report" is cliked, it causes
>> "datetime" parameter boxes to re-oder the dates so that "mm" and "dd"
>> values are interchanged.
>> For instance, if I enter "12/02/2006" (meaning Feb 02, 2006, in
>> Australian format ie. dd/mm/yyyy) and click "View Report" button, the
>> datatime parameter is rearranged as "02/12/2006", and consequenly
>> producing data for Dec 02, 2006.
>> Strangely, If I click "view report" again, it interchanges "dd" and
>> "mm" values again resulting the date I originally intended and produces
>> the correct report. Clicking "View Report" again causes "dd" and "mm"
>> to interchange, and so on it goes.
>> If I enter "20/02/2006" in the datetime parameter box, and click "View
>> Report" button, I get an error message about incorrect datetime format.
>> "An error occured during local report processing. The value provided
>> for the report parameter 'dtStartDate' is not valid for its type".
>> So, it appears that VS2005
>> * expects me to input datetime as "mm/dd/yyyy" format,
>> * rearranges "mm" and "dd" to "dd/mm/yyyy" format (whenever "View
>> Report" button is clicked) before passing the parameters to the stored
>> procedures.
>> I have set the report's "Language" property to "Australia", and WinXP's
>> language to "Australian English"
>> Any suggestions and workarounds are greatly appreciated.
>> Thanks
>> Sur
>>|||Ed and Wayne,
Thanks. I published the reports at a Reporting Server instance; it
doesn't suffer from this bug. I guess until a service pack is realised
for VS2005, I'll have to enter dates in the universal format
(yyyy-MM-dd) to overcome this bug.
Showing posts with label business. Show all posts
Showing posts with label business. Show all posts
Wednesday, March 21, 2012
Tuesday, February 14, 2012
DATEADD function
I want to add two business days to a date that I have. I
have DateAdd(dd,2,Orders.DeliverDate) already working,
but I want it to only add 2 business days.
In other words if 01/25/2004 falls on a friday, then I
want it to return 0129/2004.
TIA,
VicYou'll need a calendar table that contains all valid business days.
Otherwise, you won't be able to account for holidays.
"Vic" <vduran@.specpro-inc.com> wrote in message
news:18aca01c42331$514c2190$a001280a@.phx.gbl...
> I want to add two business days to a date that I have. I
> have DateAdd(dd,2,Orders.DeliverDate) already working,
> but I want it to only add 2 business days.
> In other words if 01/25/2004 falls on a friday, then I
> want it to return 0129/2004.
> TIA,
> Vic|||http://www.aspfaq.com/2519
http://www.aspfaq.com/2453
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Vic" <vduran@.specpro-inc.com> wrote in message
news:18aca01c42331$514c2190$a001280a@.phx.gbl...
>I want to add two business days to a date that I have. I
> have DateAdd(dd,2,Orders.DeliverDate) already working,
> but I want it to only add 2 business days.
> In other words if 01/25/2004 falls on a friday, then I
> want it to return 0129/2004.
> TIA,
> Vic|||What about just weekends?
>--Original Message--
>You'll need a calendar table that contains all valid
business days.
>Otherwise, you won't be able to account for holidays.
>"Vic" <vduran@.specpro-inc.com> wrote in message
>news:18aca01c42331$514c2190$a001280a@.phx.gbl...
>> I want to add two business days to a date that I
have. I
>> have DateAdd(dd,2,Orders.DeliverDate) already working,
>> but I want it to only add 2 business days.
>> In other words if 01/25/2004 falls on a friday, then I
>> want it to return 0129/2004.
>> TIA,
>> Vic
>
>.
>|||A calendar table still better because you set it up once, and your
individual queries don't have to worry about what day of the week is today,
what days of the week are weekends, etc.
Please see the links I posted.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
<anonymous@.discussions.microsoft.com> wrote in message
news:1d38901c42334$b8d40230$a501280a@.phx.gbl...
> What about just weekends?
>
>>--Original Message--
>>You'll need a calendar table that contains all valid
> business days.
>>Otherwise, you won't be able to account for holidays.
>>"Vic" <vduran@.specpro-inc.com> wrote in message
>>news:18aca01c42331$514c2190$a001280a@.phx.gbl...
>> I want to add two business days to a date that I
> have. I
>> have DateAdd(dd,2,Orders.DeliverDate) already working,
>> but I want it to only add 2 business days.
>> In other words if 01/25/2004 falls on a friday, then I
>> want it to return 0129/2004.
>> TIA,
>> Vic
>>
>>.
have DateAdd(dd,2,Orders.DeliverDate) already working,
but I want it to only add 2 business days.
In other words if 01/25/2004 falls on a friday, then I
want it to return 0129/2004.
TIA,
VicYou'll need a calendar table that contains all valid business days.
Otherwise, you won't be able to account for holidays.
"Vic" <vduran@.specpro-inc.com> wrote in message
news:18aca01c42331$514c2190$a001280a@.phx.gbl...
> I want to add two business days to a date that I have. I
> have DateAdd(dd,2,Orders.DeliverDate) already working,
> but I want it to only add 2 business days.
> In other words if 01/25/2004 falls on a friday, then I
> want it to return 0129/2004.
> TIA,
> Vic|||http://www.aspfaq.com/2519
http://www.aspfaq.com/2453
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Vic" <vduran@.specpro-inc.com> wrote in message
news:18aca01c42331$514c2190$a001280a@.phx.gbl...
>I want to add two business days to a date that I have. I
> have DateAdd(dd,2,Orders.DeliverDate) already working,
> but I want it to only add 2 business days.
> In other words if 01/25/2004 falls on a friday, then I
> want it to return 0129/2004.
> TIA,
> Vic|||What about just weekends?
>--Original Message--
>You'll need a calendar table that contains all valid
business days.
>Otherwise, you won't be able to account for holidays.
>"Vic" <vduran@.specpro-inc.com> wrote in message
>news:18aca01c42331$514c2190$a001280a@.phx.gbl...
>> I want to add two business days to a date that I
have. I
>> have DateAdd(dd,2,Orders.DeliverDate) already working,
>> but I want it to only add 2 business days.
>> In other words if 01/25/2004 falls on a friday, then I
>> want it to return 0129/2004.
>> TIA,
>> Vic
>
>.
>|||A calendar table still better because you set it up once, and your
individual queries don't have to worry about what day of the week is today,
what days of the week are weekends, etc.
Please see the links I posted.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
<anonymous@.discussions.microsoft.com> wrote in message
news:1d38901c42334$b8d40230$a501280a@.phx.gbl...
> What about just weekends?
>
>>--Original Message--
>>You'll need a calendar table that contains all valid
> business days.
>>Otherwise, you won't be able to account for holidays.
>>"Vic" <vduran@.specpro-inc.com> wrote in message
>>news:18aca01c42331$514c2190$a001280a@.phx.gbl...
>> I want to add two business days to a date that I
> have. I
>> have DateAdd(dd,2,Orders.DeliverDate) already working,
>> but I want it to only add 2 business days.
>> In other words if 01/25/2004 falls on a friday, then I
>> want it to return 0129/2004.
>> TIA,
>> Vic
>>
>>.
DATEADD function
I want to add two business days to a date that I have. I
have DateAdd(dd,2,Orders.DeliverDate) already working,
but I want it to only add 2 business days.
In other words if 01/25/2004 falls on a friday, then I
want it to return 0129/2004.
TIA,
Vic
You'll need a calendar table that contains all valid business days.
Otherwise, you won't be able to account for holidays.
"Vic" <vduran@.specpro-inc.com> wrote in message
news:18aca01c42331$514c2190$a001280a@.phx.gbl...
> I want to add two business days to a date that I have. I
> have DateAdd(dd,2,Orders.DeliverDate) already working,
> but I want it to only add 2 business days.
> In other words if 01/25/2004 falls on a friday, then I
> want it to return 0129/2004.
> TIA,
> Vic
|||http://www.aspfaq.com/2519
http://www.aspfaq.com/2453
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Vic" <vduran@.specpro-inc.com> wrote in message
news:18aca01c42331$514c2190$a001280a@.phx.gbl...
>I want to add two business days to a date that I have. I
> have DateAdd(dd,2,Orders.DeliverDate) already working,
> but I want it to only add 2 business days.
> In other words if 01/25/2004 falls on a friday, then I
> want it to return 0129/2004.
> TIA,
> Vic
|||What about just weekends?
>--Original Message--
>You'll need a calendar table that contains all valid
business days.[vbcol=seagreen]
>Otherwise, you won't be able to account for holidays.
>"Vic" <vduran@.specpro-inc.com> wrote in message
>news:18aca01c42331$514c2190$a001280a@.phx.gbl...
have. I
>
>.
>
|||A calendar table still better because you set it up once, and your
individual queries don't have to worry about what day of the week is today,
what days of the week are weekends, etc.
Please see the links I posted.
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
<anonymous@.discussions.microsoft.com> wrote in message
news:1d38901c42334$b8d40230$a501280a@.phx.gbl...[vbcol=seagreen]
> What about just weekends?
>
> business days.
> have. I
have DateAdd(dd,2,Orders.DeliverDate) already working,
but I want it to only add 2 business days.
In other words if 01/25/2004 falls on a friday, then I
want it to return 0129/2004.
TIA,
Vic
You'll need a calendar table that contains all valid business days.
Otherwise, you won't be able to account for holidays.
"Vic" <vduran@.specpro-inc.com> wrote in message
news:18aca01c42331$514c2190$a001280a@.phx.gbl...
> I want to add two business days to a date that I have. I
> have DateAdd(dd,2,Orders.DeliverDate) already working,
> but I want it to only add 2 business days.
> In other words if 01/25/2004 falls on a friday, then I
> want it to return 0129/2004.
> TIA,
> Vic
|||http://www.aspfaq.com/2519
http://www.aspfaq.com/2453
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Vic" <vduran@.specpro-inc.com> wrote in message
news:18aca01c42331$514c2190$a001280a@.phx.gbl...
>I want to add two business days to a date that I have. I
> have DateAdd(dd,2,Orders.DeliverDate) already working,
> but I want it to only add 2 business days.
> In other words if 01/25/2004 falls on a friday, then I
> want it to return 0129/2004.
> TIA,
> Vic
|||What about just weekends?
>--Original Message--
>You'll need a calendar table that contains all valid
business days.[vbcol=seagreen]
>Otherwise, you won't be able to account for holidays.
>"Vic" <vduran@.specpro-inc.com> wrote in message
>news:18aca01c42331$514c2190$a001280a@.phx.gbl...
have. I
>
>.
>
|||A calendar table still better because you set it up once, and your
individual queries don't have to worry about what day of the week is today,
what days of the week are weekends, etc.
Please see the links I posted.
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
<anonymous@.discussions.microsoft.com> wrote in message
news:1d38901c42334$b8d40230$a501280a@.phx.gbl...[vbcol=seagreen]
> What about just weekends?
>
> business days.
> have. I
DATEADD function
I want to add two business days to a date that I have. I
have DateAdd(dd,2,Orders.DeliverDate) already working,
but I want it to only add 2 business days.
In other words if 01/25/2004 falls on a friday, then I
want it to return 0129/2004.
TIA,
VicYou'll need a calendar table that contains all valid business days.
Otherwise, you won't be able to account for holidays.
"Vic" <vduran@.specpro-inc.com> wrote in message
news:18aca01c42331$514c2190$a001280a@.phx
.gbl...
> I want to add two business days to a date that I have. I
> have DateAdd(dd,2,Orders.DeliverDate) already working,
> but I want it to only add 2 business days.
> In other words if 01/25/2004 falls on a friday, then I
> want it to return 0129/2004.
> TIA,
> Vic|||http://www.aspfaq.com/2519
http://www.aspfaq.com/2453
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Vic" <vduran@.specpro-inc.com> wrote in message
news:18aca01c42331$514c2190$a001280a@.phx
.gbl...
>I want to add two business days to a date that I have. I
> have DateAdd(dd,2,Orders.DeliverDate) already working,
> but I want it to only add 2 business days.
> In other words if 01/25/2004 falls on a friday, then I
> want it to return 0129/2004.
> TIA,
> Vic|||What about just weekends?
>--Original Message--
>You'll need a calendar table that contains all valid
business days.
>Otherwise, you won't be able to account for holidays.
>"Vic" <vduran@.specpro-inc.com> wrote in message
> news:18aca01c42331$514c2190$a001280a@.phx
.gbl...
have. I[vbcol=seagreen]
>
>.
>|||A calendar table still better because you set it up once, and your
individual queries don't have to worry about what day of the week is today,
what days of the week are weekends, etc.
Please see the links I posted.
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
<anonymous@.discussions.microsoft.com> wrote in message
news:1d38901c42334$b8d40230$a501280a@.phx
.gbl...[vbcol=seagreen]
> What about just weekends?
>
> business days.
> have. I
have DateAdd(dd,2,Orders.DeliverDate) already working,
but I want it to only add 2 business days.
In other words if 01/25/2004 falls on a friday, then I
want it to return 0129/2004.
TIA,
VicYou'll need a calendar table that contains all valid business days.
Otherwise, you won't be able to account for holidays.
"Vic" <vduran@.specpro-inc.com> wrote in message
news:18aca01c42331$514c2190$a001280a@.phx
.gbl...
> I want to add two business days to a date that I have. I
> have DateAdd(dd,2,Orders.DeliverDate) already working,
> but I want it to only add 2 business days.
> In other words if 01/25/2004 falls on a friday, then I
> want it to return 0129/2004.
> TIA,
> Vic|||http://www.aspfaq.com/2519
http://www.aspfaq.com/2453
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Vic" <vduran@.specpro-inc.com> wrote in message
news:18aca01c42331$514c2190$a001280a@.phx
.gbl...
>I want to add two business days to a date that I have. I
> have DateAdd(dd,2,Orders.DeliverDate) already working,
> but I want it to only add 2 business days.
> In other words if 01/25/2004 falls on a friday, then I
> want it to return 0129/2004.
> TIA,
> Vic|||What about just weekends?
>--Original Message--
>You'll need a calendar table that contains all valid
business days.
>Otherwise, you won't be able to account for holidays.
>"Vic" <vduran@.specpro-inc.com> wrote in message
> news:18aca01c42331$514c2190$a001280a@.phx
.gbl...
have. I[vbcol=seagreen]
>
>.
>|||A calendar table still better because you set it up once, and your
individual queries don't have to worry about what day of the week is today,
what days of the week are weekends, etc.
Please see the links I posted.
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
<anonymous@.discussions.microsoft.com> wrote in message
news:1d38901c42334$b8d40230$a501280a@.phx
.gbl...[vbcol=seagreen]
> What about just weekends?
>
> business days.
> have. I
Subscribe to:
Posts (Atom)