the function "datepart(dw, getdate())" works just fine on
Microsoft Sql Server Management Studio.
However, the function " datepart("dw", Now()) " doesn't work on report.
Is there someone who got the idea why it doesn't work?
Is there any other function which works same on report?
-KenYes. Reporting services uses the .Net langauge instead of TSQL. You can use
the following:
now.DayOfWeek
"MS newsgroup" wrote:
> the function "datepart(dw, getdate())" works just fine on
> Microsoft Sql Server Management Studio.
> However, the function " datepart("dw", Now()) " doesn't work on report.
> Is there someone who got the idea why it doesn't work?
> Is there any other function which works same on report?
>
> -Ken
>
>|||could you tell me more specifically?
do I need to use then "datepart("dw", now.DayOfWeek
)"
Main goal is return integer depending on the dayofweek.
Thanks
if sunday =1, saturday=7
"QM06" <QM06@.discussions.microsoft.com> wrote in message
news:7F34F2EC-1394-4827-96AE-1360260A75CC@.microsoft.com...
> Yes. Reporting services uses the .Net langauge instead of TSQL. You can
> use
> the following:
> now.DayOfWeek
> "MS newsgroup" wrote:
>> the function "datepart(dw, getdate())" works just fine on
>> Microsoft Sql Server Management Studio.
>> However, the function " datepart("dw", Now()) " doesn't work on report.
>> Is there someone who got the idea why it doesn't work?
>> Is there any other function which works same on report?
>>
>> -Ken
>>|||Datepart is not needed. Just use Now.dayofweek. You'll get your integer and
that's that.
"MS newsgroup" wrote:
> could you tell me more specifically?
> do I need to use then "datepart("dw", now.DayOfWeek
> )"
> Main goal is return integer depending on the dayofweek.
> Thanks
> if sunday =1, saturday=7
>
> "QM06" <QM06@.discussions.microsoft.com> wrote in message
> news:7F34F2EC-1394-4827-96AE-1360260A75CC@.microsoft.com...
> > Yes. Reporting services uses the .Net langauge instead of TSQL. You can
> > use
> > the following:
> > now.DayOfWeek
> >
> > "MS newsgroup" wrote:
> >
> >> the function "datepart(dw, getdate())" works just fine on
> >> Microsoft Sql Server Management Studio.
> >> However, the function " datepart("dw", Now()) " doesn't work on report.
> >>
> >> Is there someone who got the idea why it doesn't work?
> >> Is there any other function which works same on report?
> >>
> >>
> >> -Ken
> >>
> >>
> >>
>
>|||It doesn't work if I use Now.dayofweek itself.
"QM06" <QM06@.discussions.microsoft.com> wrote in message
news:78DAE85A-14CC-4CC5-8266-07061B26F99A@.microsoft.com...
> Datepart is not needed. Just use Now.dayofweek. You'll get your integer
> and
> that's that.
> "MS newsgroup" wrote:
>> could you tell me more specifically?
>> do I need to use then "datepart("dw", now.DayOfWeek
>> )"
>> Main goal is return integer depending on the dayofweek.
>> Thanks
>> if sunday =1, saturday=7
>>
>> "QM06" <QM06@.discussions.microsoft.com> wrote in message
>> news:7F34F2EC-1394-4827-96AE-1360260A75CC@.microsoft.com...
>> > Yes. Reporting services uses the .Net langauge instead of TSQL. You can
>> > use
>> > the following:
>> > now.DayOfWeek
>> >
>> > "MS newsgroup" wrote:
>> >
>> >> the function "datepart(dw, getdate())" works just fine on
>> >> Microsoft Sql Server Management Studio.
>> >> However, the function " datepart("dw", Now()) " doesn't work on
>> >> report.
>> >>
>> >> Is there someone who got the idea why it doesn't work?
>> >> Is there any other function which works same on report?
>> >>
>> >>
>> >> -Ken
>> >>
>> >>
>> >>
>>|||If you're using this in the report body you could try this =now.dayofweek().
"MS newsgroup" wrote:
> It doesn't work if I use Now.dayofweek itself.
>
> "QM06" <QM06@.discussions.microsoft.com> wrote in message
> news:78DAE85A-14CC-4CC5-8266-07061B26F99A@.microsoft.com...
> > Datepart is not needed. Just use Now.dayofweek. You'll get your integer
> > and
> > that's that.
> >
> > "MS newsgroup" wrote:
> >
> >> could you tell me more specifically?
> >> do I need to use then "datepart("dw", now.DayOfWeek
> >> )"
> >>
> >> Main goal is return integer depending on the dayofweek.
> >>
> >> Thanks
> >> if sunday =1, saturday=7
> >>
> >>
> >> "QM06" <QM06@.discussions.microsoft.com> wrote in message
> >> news:7F34F2EC-1394-4827-96AE-1360260A75CC@.microsoft.com...
> >> > Yes. Reporting services uses the .Net langauge instead of TSQL. You can
> >> > use
> >> > the following:
> >> > now.DayOfWeek
> >> >
> >> > "MS newsgroup" wrote:
> >> >
> >> >> the function "datepart(dw, getdate())" works just fine on
> >> >> Microsoft Sql Server Management Studio.
> >> >> However, the function " datepart("dw", Now()) " doesn't work on
> >> >> report.
> >> >>
> >> >> Is there someone who got the idea why it doesn't work?
> >> >> Is there any other function which works same on report?
> >> >>
> >> >>
> >> >> -Ken
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
No comments:
Post a Comment