Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

COMBINED-DATETIME anomaly ?
Can somebody tell me what this is supposed to return ?

15.15 COMBINED-DATETIME function
The COMBINED-DATETIME function combines a value in integer date form and a
time in standard numeric time
form into a single numeric item into a common form.
The type of this function is numeric.

15.15.1 General format

FUNCTION COMBINED-DATETIME ( argument-1 argument-2 )

15.15.2 Arguments

1) Argument-1 shall be in integer date form.
2) Argument-2 shall be in standard numeric time form.

15.15.3 Returned values

1) The equivalent arithmetic expression is as follows:
argument-1 + (argument-2 / 100000)



argument-2 contains seconds-past-midnight (standard numeric time form),
so we divide maximum 86400 by 100000 giving 0.
Result is argument-1.
Hmm.

Roger



Report this thread to moderator Post Follow-up to this message
Old Post
Roger While
08-09-06 08:55 AM


Re: COMBINED-DATETIME anomaly ?
I think this is trying to put the "integer date" to the left of the decimal
point an the time past midnight to the right of the decimal point.

Does that help?

--
Bill Klein
wmklein <at> ix.netcom.com
"Roger While" <simrw@sim-basis.de> wrote in message
news:ebc3gs$eeg$03$1@news.t-online.com...
> Can somebody tell me what this is supposed to return ?
>
> 15.15 COMBINED-DATETIME function
> The COMBINED-DATETIME function combines a value in integer date form and a
> time in standard numeric time
> form into a single numeric item into a common form.
> The type of this function is numeric.
>
> 15.15.1 General format
>
> FUNCTION COMBINED-DATETIME ( argument-1 argument-2 )
>
> 15.15.2 Arguments
>
> 1) Argument-1 shall be in integer date form.
> 2) Argument-2 shall be in standard numeric time form.
>
> 15.15.3 Returned values
>
> 1) The equivalent arithmetic expression is as follows:
> argument-1 + (argument-2 / 100000)
>
>
>
> argument-2 contains seconds-past-midnight (standard numeric time form),
> so we divide maximum 86400 by 100000 giving 0.
> Result is argument-1.
> Hmm.
>
> Roger
>



Report this thread to moderator Post Follow-up to this message
Old Post
William M. Klein
08-09-06 08:55 AM


Re: COMBINED-DATETIME anomaly ?
You "think" this is so or you "know" this is so ?  :-)
If this is so that it is intended that the seconds become
decimals, then I don't see what this is trying to do or what
it can be used for.
Consider seconds = 86400 (ie. a full day) at day 1.
According to this we would get 1.864 whereby I would
expect 2.0 or ?
.864 of what ? apples, oranges ?
Or eg. Day 1 second 1 -
We get 1.000001

You see the problem ?

Roger

"William M. Klein" <wmklein@nospam.netcom.com> schrieb im Newsbeitrag
news:dEgCg.359084$GD7.61227@fe08.news.easynews.com...
>I think this is trying to put the "integer date" to the left of the decimal
>point an the time past midnight to the right of the decimal point.
>
> Does that help?
>
> --
> Bill Klein
> wmklein <at> ix.netcom.com
> "Roger While" <simrw@sim-basis.de> wrote in message
> news:ebc3gs$eeg$03$1@news.t-online.com... 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Roger While
08-09-06 08:55 AM


Re: COMBINED-DATETIME anomaly ?
"Roger While" <simrw@sim-basis.de> wrote in message
news:ebc6s3$las$03$1@news.t-online.com...
> You "think" this is so or you "know" this is so ?  :-)
> If this is so that it is intended that the seconds become
> decimals, then I don't see what this is trying to do or what
> it can be used for.
> Consider seconds = 86400 (ie. a full day) at day 1.
> According to this we would get 1.864 whereby I would
> expect 2.0 or ?
> .864 of what ? apples, oranges ?
> Or eg. Day 1 second 1 -
> We get 1.000001
>
> You see the problem ?

Yes. Unfortunately you seem to be making more of it
than it is.

WD 1.6, page 846, D.27.4.9 COMBINED-DATETIME
function,
"The COMBINED-DATETIME function accepts two
arguments - a date in integer date form, and a time in standard
numeric time form - and returns a numeric value in which the
date occupies the integer part of the value and the time
represents the fractional part, according to the expression
argument-1 + (argument-2 / 100000). For example, given the
integer date form value 143951 (representing the date
February 15, 1995) and the standard numeric time form value
18867.812479168304 (representing the time
05:14:27.812479168304), the returned value would be exactly
143951.18867812479168304. The intent of this function is to
provide a standard numeric representation of a combined date
and time in a single variable, for any date from January 1, 1601
onward, to at least nanosecond precision."




Report this thread to moderator Post Follow-up to this message
Old Post
Rick Smith
08-09-06 12:55 PM


Re: COMBINED-DATETIME anomaly ?
Fine, and what exactly can I do with this ?

Roger

"Rick Smith" <ricksmith@mfi.net> schrieb im Newsbeitrag
news:12djdbnqldd0q56@corp.supernews.com...
>
> "Roger While" <simrw@sim-basis.de> wrote in message
> news:ebc6s3$las$03$1@news.t-online.com... 
>
> Yes. Unfortunately you seem to be making more of it
> than it is.
>
> WD 1.6, page 846, D.27.4.9 COMBINED-DATETIME
> function,
> "The COMBINED-DATETIME function accepts two
> arguments - a date in integer date form, and a time in standard
> numeric time form - and returns a numeric value in which the
> date occupies the integer part of the value and the time
> represents the fractional part, according to the expression
> argument-1 + (argument-2 / 100000). For example, given the
> integer date form value 143951 (representing the date
> February 15, 1995) and the standard numeric time form value
> 18867.812479168304 (representing the time
> 05:14:27.812479168304), the returned value would be exactly
> 143951.18867812479168304. The intent of this function is to
> provide a standard numeric representation of a combined date
> and time in a single variable, for any date from January 1, 1601
> onward, to at least nanosecond precision."
>
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Roger While
08-09-06 12:55 PM


Re: COMBINED-DATETIME anomaly ?
"Roger While" <simrw@sim-basis.de> wrote in message
news:ebcfar$kg6$00$1@news.t-online.com...
> Fine, and what exactly can I do with this ?

Use it as a time stamp wherever desired and use
it as input to other functions, such as, the
FORMATTED-DATETIME function,
INTEGER-OF-FORMATTED-DATE function,
SECONDS-FROM-FORMATTED-TIME function,
TEST-FORMATTED-DATETIME function, and
maybe some others I didn't locate.




Report this thread to moderator Post Follow-up to this message
Old Post
Rick Smith
08-09-06 12:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:25 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.