hi,
i've got a "parameter" that is of date type, but is there any way so that it
only shows the "short date" format -- don't want the time.
thanks,Maersa,
yeah, u can write a small function is custom code that takes string
as a parameter and return the same. in that function u can write
conversion functionality. and use this function is expresssion of
textbox or wherever u want.
textbox = Code.GetShortDate(Parameters!Name.Value)
and in custom code write a fuction with VB
Note: function declaration here might not be synteticaly correct.
Shared fuction GetShortDate(byval date a string) as String
write code here to convert date to DateTime and back to string
return shortdate
end function
hope this helps.
Thanks,
mahesh|||thanks mahesh,
how would i write a .NET assembly and then use it within my report ?
thanks,
"Mahesh" <gaware@.gmail.com> wrote in message
news:1121998689.809184.145380@.f14g2000cwb.googlegroups.com...
> Maersa,
> yeah, u can write a small function is custom code that takes string
> as a parameter and return the same. in that function u can write
> conversion functionality. and use this function is expresssion of
> textbox or wherever u want.
> textbox = Code.GetShortDate(Parameters!Name.Value)
> and in custom code write a fuction with VB
> Note: function declaration here might not be synteticaly correct.
> Shared fuction GetShortDate(byval date a string) as String
> write code here to convert date to DateTime and back to string
> return shortdate
> end function
> hope this helps.
> Thanks,
> mahesh
>|||There is no way you can do this. You can use the data format elsewhere and
strip the time as the other posting was saying but you cannot have report
manager change how it functions. What you can do is to use string parameter
type instead of date parameter type. That is what I do when I don't want the
time. Of course, then they could put in something that is not a date.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"maersa" <masa_iwasa@.hotmail.com> wrote in message
news:OqI9PGmjFHA.3164@.TK2MSFTNGP15.phx.gbl...
> hi,
> i've got a "parameter" that is of date type, but is there any way so that
> it only shows the "short date" format -- don't want the time.
> thanks,
>|||The code he is talking about can exist in the report itself with no outside
dependencies... Go to Report->Code from the top menu item and add your
functions there...I also have a example that does not use a code function
( if I remember correctly) at www.msbicentral.com
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"maersa" <masa_iwasa@.hotmail.com> wrote in message
news:OqI9PGmjFHA.3164@.TK2MSFTNGP15.phx.gbl...
> hi,
> i've got a "parameter" that is of date type, but is there any way so that
> it only shows the "short date" format -- don't want the time.
> thanks,
>|||I have a report that i did in visual studio that calls a stored procedure.
the @.AsOfDate is of datetime format in the procedure. In visual studio, i
made it a string. I even defaulted a string value of 12/31/2007. When i
deploy it in reporting services, it shows up as string, which is correct, but
it has a default of 12/31/2007 12:00:00 AM. Is there anyway i can get rid of
the time?
"Bruce L-C [MVP]" wrote:
> There is no way you can do this. You can use the data format elsewhere and
> strip the time as the other posting was saying but you cannot have report
> manager change how it functions. What you can do is to use string parameter
> type instead of date parameter type. That is what I do when I don't want the
> time. Of course, then they could put in something that is not a date.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "maersa" <masa_iwasa@.hotmail.com> wrote in message
> news:OqI9PGmjFHA.3164@.TK2MSFTNGP15.phx.gbl...
> > hi,
> >
> > i've got a "parameter" that is of date type, but is there any way so that
> > it only shows the "short date" format -- don't want the time.
> >
> > thanks,
> >
> >
>
>|||Can't you just use FieldName.Value.ToShortDateString ?
--
"Everyone knows something you don't know"
"Wayne Snyder" wrote:
> The code he is talking about can exist in the report itself with no outside
> dependencies... Go to Report->Code from the top menu item and add your
> functions there...I also have a example that does not use a code function
> ( if I remember correctly) at www.msbicentral.com
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> (Please respond only to the newsgroup.)
> I support the Professional Association for SQL Server ( PASS) and it's
> community of SQL Professionals.
> "maersa" <masa_iwasa@.hotmail.com> wrote in message
> news:OqI9PGmjFHA.3164@.TK2MSFTNGP15.phx.gbl...
> > hi,
> >
> > i've got a "parameter" that is of date type, but is there any way so that
> > it only shows the "short date" format -- don't want the time.
> >
> > thanks,
> >
> >
>
>|||Where are you making it a string? Click somewhere blank on your report.
Menu->Report->Report Parameters. Click on the parameter and change the data
type to string.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"deniseamat" <deniseamat@.discussions.microsoft.com> wrote in message
news:296463D8-01F3-4906-BB0B-C0F0DAFB9490@.microsoft.com...
>I have a report that i did in visual studio that calls a stored procedure.
> the @.AsOfDate is of datetime format in the procedure. In visual studio, i
> made it a string. I even defaulted a string value of 12/31/2007. When i
> deploy it in reporting services, it shows up as string, which is correct,
> but
> it has a default of 12/31/2007 12:00:00 AM. Is there anyway i can get rid
> of
> the time?
> "Bruce L-C [MVP]" wrote:
>> There is no way you can do this. You can use the data format elsewhere
>> and
>> strip the time as the other posting was saying but you cannot have report
>> manager change how it functions. What you can do is to use string
>> parameter
>> type instead of date parameter type. That is what I do when I don't want
>> the
>> time. Of course, then they could put in something that is not a date.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "maersa" <masa_iwasa@.hotmail.com> wrote in message
>> news:OqI9PGmjFHA.3164@.TK2MSFTNGP15.phx.gbl...
>> > hi,
>> >
>> > i've got a "parameter" that is of date type, but is there any way so
>> > that
>> > it only shows the "short date" format -- don't want the time.
>> >
>> > thanks,
>> >
>> >
>>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment