Showing posts with label sp1. Show all posts
Showing posts with label sp1. Show all posts

Tuesday, March 27, 2012

date query

Hi,
I'm trying to convert the last four numbers of the following string
SP1/84/056351/0406
to a date. It should default to the 31st of the month. In the above
case it would be 31st of April 2006. Anyone any ideas?declare @.str varchar(20)
set @.str = 'SP1/84/056351/0406'
declare @.month varchar(2)
declare @.year varchar(2)
set @.year = right (@.str,2)
select @.month = substring (@.str, len(@.str)-3,2)
select @.month
select @.year
select dateadd(m,1, convert(datetime,@.year+@.month+'01')) - 1
Regards
Amish Shah|||Thank you for the help Amish
Regards
Ross|||Thank you for the help Amish
Regards
Ross|||rosco wrote on 6 Mar 2006 02:24:13 -0800:
> Hi,
> I'm trying to convert the last four numbers of the following string
> SP1/84/056351/0406
> to a date. It should default to the 31st of the month. In the above
> case it would be 31st of April 2006. Anyone any ideas?
You want it to default to an invalid date? There are only 30 days in April.
Dan

Sunday, March 25, 2012

date picker in RS doesn't follow regional setting

hi all,
i've just updated my sql server 2005 with sp1 and sp2.
i want my report date format to change according to regional setting,
therefore i've set the report property for language as User.Language.
i've also enter the format i wanted in IE option..
how do i set the report parameter of type datetime to follow the
format of regional setting?
my date parameter has default value which i query from a table.
for e.g. if my regional setting is UK and the default date is
9/7/2006, the date picker will display date at 7 september 2006
instead.
please help... thanks!anybody?|||https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=271928
The following solution helped me:
Change Culture for your reportserver page.
Edit the ReportViewer.aspx webpage. It usually in this directory:
"%ProgramFiles%\Microsoft SQL Server\MSSQL.2\Reporting
Services\ReportServer\Pages\"
Add Culture attribute to the @.Page declaration like this:
<%@. Page Language="C#" AutoEventWireup="true"
Inherits="Microsoft.ReportingServices.WebServer.ReportViewerPage"
Culture="de-DE" %>
Regards,
Stefan
"minority" <kokpenglow@.gmail.com> schrieb im Newsbeitrag
news:1181787881.409498.256650@.g37g2000prf.googlegroups.com...
> anybody?
>|||Thanks Stefan.
Worked great for me en-GB
Paul Cahill
"Stefan" <stefan@.nospam.nospam> wrote in message
news:e#k506$tHHA.4572@.TK2MSFTNGP02.phx.gbl...
> https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=271928
> The following solution helped me:
> Change Culture for your reportserver page.
> Edit the ReportViewer.aspx webpage. It usually in this directory:
> "%ProgramFiles%\Microsoft SQL Server\MSSQL.2\Reporting
> Services\ReportServer\Pages\"
> Add Culture attribute to the @.Page declaration like this:
> <%@. Page Language="C#" AutoEventWireup="true"
> Inherits="Microsoft.ReportingServices.WebServer.ReportViewerPage"
> Culture="de-DE" %>
>
> Regards,
> Stefan
>
> "minority" <kokpenglow@.gmail.com> schrieb im Newsbeitrag
> news:1181787881.409498.256650@.g37g2000prf.googlegroups.com...
>> anybody?
>

date picker format

hi all,

i've just updated my sql server 2005 with sp1 and sp2.

i want my report date format to change according to regional setting, therefore i've set the report property for language as User.Language.

how do i set the report parameter of type datetime to follow the format of regional setting?

my date parameter has default value which i query from a table.

for e.g. if my regional setting is UK and the default date is 9/7/2006, the date picker will display date at 7 september 2006 instead.

please help.... thanks!

i've also enter the format i wanted in IE option..

|||If you have a parameter of datetime, and the report language setting is user!langauge, and the datetime in IE is not coming out as expected, then you do not have you local regional settings set up correctly.|||

thanks for your reply adolf...

my pc regional setting:

Regional Options tab:

Standard and formats:

English (United Kingdom)

Short date: 14/06/2007

Long date: 14 June 2007

Location: United Kingdom

Advanced tab:

Language for non-Unicode programs:

English (United Kingdom)

anywhere else to check? thanks!

|||In IE but I think you said you already checked this:

IE: tools - options - general - [languages...] -

There may be something else to check, if the above doesn't work let me know and I'll try and find out|||

in IE, Language: English (United Kingdom) [en-gb]

still not working... is it because of the default value of the parameter? but it's displaying the correct format for the date... Sad

thanks for your help