Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Daytypes

3 posts in PB Infomaker Report Writer Last posting was on 1998-03-07 15:52:50.0Z
Christopher F Jackson Posted on 1997-12-20 03:59:12.0Z
Newsgroups: sybase.public.infomaker.general
Date: Fri, 19 Dec 1997 22:59:12 -0500
From: Christopher F Jackson <cfjackson@earthlink.net>
X-Mailer: Mozilla 4.04 [en] (Win95; I)
MIME-Version: 1.0
Subject: Daytypes
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 8
Message-ID: <348_349B428F.F6791697@earthlink.net>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.infomaker.general:7353
Article PK: 244408

Is there any way to retrieve only the records where the date is equal to
a specific day type
by using either a selective retrieval argument. or coding it in SQL
I need to create reports by weekday and weekend.

Using IM 5.0
1=sunday 2=tuesday

Thanks
Christopher F Jackson


Terry Dykstra Posted on 1997-12-23 19:26:03.0Z
Newsgroups: sybase.public.infomaker.general
From: "Terry Dykstra" <tdykstra@cfol.ab.ca>
Subject: Re: Daytypes
X-Newsreader: Microsoft Internet News 4.70.1161
Date: Tue, 23 Dec 1997 14:26:03 -0500
Lines: 20
Message-ID: <348_01bd0fe1$8c25fd00$8366e4cf@tdykstra.cfol.ab.ca>
References: <348_349B428F.F6791697@earthlink.net>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.infomaker.general:7352
Article PK: 244409

Most database have date functions that will allow that. For instance, in
Oracle you could use to_char(my_date,'D') = '1' would retrieve sunday's
records.
In SQLAnywhere you would use the DOW() function.

In the report painter you can use the daynumber(my_date) function, but it
is not as efficient as using a SQL function.

Terry Dykstra (TeamPS)

Christopher F Jackson <cfjackson@earthlink.net> wrote in article
<349B428F.F6791697@earthlink.net>...
> Is there any way to retrieve only the records where the date is equal to
> a specific day type
> by using either a selective retrieval argument. or coding it in SQL
> I need to create reports by weekday and weekend.
>
> Using IM 5.0
> 1=sunday 2=tuesday
>
> Thanks
> Christopher F Jackson
>
>


Christopher F Jackson Posted on 1998-03-07 15:52:50.0Z
Newsgroups: sybase.public.infomaker.general
Date: Sat, 07 Mar 1998 10:52:50 -0500
From: Christopher F Jackson <cfjackson@earthlink.net>
X-Mailer: Mozilla 4.04 [en] (Win95; I)
MIME-Version: 1.0
Subject: Re: Daytypes
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 45
Message-ID: <348_35016D52.C219AAD9@earthlink.net>
References: <348_349B428F.F6791697@earthlink.net> <348_01bd0fe1$8c25fd00$8366e4cf@tdykstra.cfol.ab.ca>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.infomaker.general:7228
Article PK: 243260

I was never able to use the to_char function to work maybe I'm using it wrong.   I tried to use daynumber in report painter and that works nice but how do you use this function to only display weekdays.  I'm using a crosstab report IM6.0 and accessing an oracle database, daynumber(my_date) >1 and daynumber(my_date) < 7 returns true false for each row but how do I only display the trues only (weekdays)  I tried an if statement but I do not know what to put if the statement is false IM wants the same type of  record type as the true .

if (daynumber(my_date) >1 and daynumber(my_date) < 7) compute_0001,????????? )

I Would rather use the to_char or something like it in my sql .

I need Help
Christopher F Jackson
Port Authority of NY & NJ

Terry Dykstra wrote:

Most database have date functions that will allow that.  For instance, in
Oracle you could use to_char(my_date,'D') = '1' would retrieve sunday's
records.
In SQLAnywhere you would use the DOW() function.

In the report painter you can use the daynumber(my_date) function, but it
is not as efficient as using a SQL function.

Terry Dykstra (TeamPS)

Christopher F Jackson <cfjackson@earthlink.net> wrote in article
<349B428F.F6791697@earthlink.net>...
> Is there any way to retrieve only the records where the date is equal to
> a specific day type
> by using either a selective retrieval argument. or coding it in SQL
> I need to create reports by weekday and weekend.
>
> Using IM 5.0
> 1=sunday 2=tuesday
>
> Thanks
> Christopher F Jackson
>
>