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.

Sum(time) datatype

4 posts in General Discussion Last posting was on 2004-12-11 20:14:41.0Z
Newbegin Devaraj Posted on 2004-12-10 14:41:47.0Z
Sender: 2e1a.41b9b4f4.1804289383@sybase.com
From: Newbegin Devaraj
Newsgroups: ianywhere.public.general
Subject: Sum(time) datatype
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <41b9b5a6.2e31.1681692777@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 10 Dec 2004 06:41:42 -0800, 10.22.241.42
Lines: 5
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 10 Dec 2004 06:41:44 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 10 Dec 2004 06:41:47 -0800
X-Trace: forums-1-dub 1102689707 10.22.108.75 (10 Dec 2004 06:41:47 -0800)
X-Original-Trace: 10 Dec 2004 06:41:47 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3962
Article PK: 7855

I have a project requirement that requires me to sum the
time. I have created a datatype time but when I try to sum
it requires me to convert to a numeric. Is there any
solution that would help me to sum the time?
For Example: 8:30 + 5:45 = 14:15minutes.


Breck Carter [TeamSybase] Posted on 2004-12-10 16:25:30.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com>
Newsgroups: ianywhere.public.general
Subject: Re: Sum(time) datatype
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__bcarter@risingroad.com
Message-ID: <mejjr0li779tahon99m5luj1hu53v06o9c@4ax.com>
References: <41b9b5a6.2e31.1681692777@sybase.com>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: bcarter.sentex.ca
X-Original-Trace: 10 Dec 2004 08:25:27 -0800, bcarter.sentex.ca
Lines: 21
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 10 Dec 2004 08:25:27 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 10 Dec 2004 08:25:30 -0800
X-Trace: forums-1-dub 1102695930 10.22.108.75 (10 Dec 2004 08:25:30 -0800)
X-Original-Trace: 10 Dec 2004 08:25:30 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3964
Article PK: 7854

There's probably something simpler than this:

SELECT DATEDIFF ( SECOND, '00:00:00', '00:08:30' )
+ DATEDIFF ( SECOND, '00:00:00', '00:05:45' ) AS sum_total,
TRUNCNUM ( sum_total / 60, 0 ) AS sum_minutes,
MOD ( sum_total, 60 ) AS sum_seconds

On 10 Dec 2004 06:41:47 -0800, Newbegin Devaraj wrote:

>I have a project requirement that requires me to sum the
>time. I have created a datatype time but when I try to sum
>it requires me to convert to a numeric. Is there any
>solution that would help me to sum the time?
>For Example: 8:30 + 5:45 = 14:15minutes.

--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/ASIN/1556225067/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com


Newbegin Devaraj Posted on 2004-12-10 18:07:02.0Z
Sender: 66da.41b9e1c0.1804289383@sybase.com
From: Newbegin Devaraj
Newsgroups: ianywhere.public.general
Subject: Re: Sum(time) datatype
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <41b9e5c6.6713.1681692777@sybase.com>
References: <41b9b5a6.2e31.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="-=_forums-1-dub41b9e5c6"
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 Dec 2004 10:07:02 -0800
X-Trace: forums-1-dub 1102702022 10.22.241.41 (10 Dec 2004 10:07:02 -0800)
X-Original-Trace: 10 Dec 2004 10:07:02 -0800, 10.22.241.41
Lines: 330
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3965
Article PK: 7858

Attached is a copy of the excel sheet and the work I am
trying to perform.

> I have a project requirement that requires me to sum the
> time. I have created a datatype time but when I try to sum
> it requires me to convert to a numeric. Is there any
> solution that would help me to sum the time?
> For Example: 8:30 + 5:45 = 14:15minutes.


Greg Fenton Posted on 2004-12-11 20:14:41.0Z
From: Greg Fenton <greg.fenton_NOSPAM_@ianywhere.com>
Organization: iAnywhere Solutions Inc.
User-Agent: Mozilla Thunderbird 1.6.3.2f (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Sum(time) datatype
References: <41b9b5a6.2e31.1681692777@sybase.com> <41b9e5c6.6713.1681692777@sybase.com>
In-Reply-To: <41b9e5c6.6713.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vpn-concord-048.sybase.com
X-Original-NNTP-Posting-Host: vpn-concord-048.sybase.com
Message-ID: <41bb5531$1@forums-1-dub>
Date: 11 Dec 2004 12:14:41 -0800
X-Trace: forums-1-dub 1102796081 158.159.8.48 (11 Dec 2004 12:14:41 -0800)
X-Original-Trace: 11 Dec 2004 12:14:41 -0800, vpn-concord-048.sybase.com
Lines: 22
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3966
Article PK: 7857


Newbegin Devaraj wrote:
> Attached is a copy of the excel sheet and the work I am
> trying to perform.
>

Please don't post proprietary formatted data files to the newsgroup.
Many of us will not bother to take the time to download, find the right
tool (if any) and view the data.

Couldn't you simply post a few lines of sample data?

Also, please post the version and build number of ASA that you are using
(e.g. use the command "dbeng9 -v" for ASA 9.x)

greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/