[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: format date-time redux



Joe,

When those date procedures run, they take the time as of that second.
The only way to sync them up is to use the same time procedure for both
situations.

Thanks,
Jay R Schutz
HR Systems
Ext. 8546

> -----Original Message-----
> From: Joe [SMTP:jejohn1216@SURFREE.COM]
> Sent: Wednesday, June 16, 1999 10:31 AM
> To:   Multiple recipients of list SQR-USERS
> Subject:      format date-time redux
>
> Hi,
>
> I posted this yesterday and got a great response about simplifying
> this code:
>
>     print 'Batch Number:' (+2,1)
>
>    do Get-Current-DateTime()
>    do DD-MON-YYYY_HH:MI:SS_AM-to-pgm($AsOfToday,'',$DD,$MM,$YY,$TT)
>    let $HR = substr($AsOfNow,1,2)
>    let $MIN = substr($AsOfNow,4,2)
>    let $SEC = substr($AsOfNow,7,2)
>    let $ReportDate = $MM || $DD || $YY
>    let $ReportTime = $HR || $MIN || $SEC
>    let $BatchNbr = $ReportDate || $ReportTime
>
>    print $BatchNbr (,24,30)
>
> To this:
>
>   select to_char(sysdate,'DDMMYYhhmmss')
>    from dual
>
> To show a 'batch number' that would display date-time as
> '150699164117' for June 15, 1999 4:41:17
>
> The first code, for some reason, displayed '1599164117' for the same
> date (no month).
>
> The 'select to_char(sysdate......) works fine, but I have to display
> the current date and time in the report header, using date-time:
>
> BEGIN-HEADING 5
>    graphic () font 4 12
>    let $TITLE = 'Accounts Payable Positive Pay Batch Summary Report'
>    print $TITLE                                    (1,1) center
>    graphic () font 4 8
>    date-time (3,1)
>    page-number (3,80) 'Page : '
>
> END-HEADING
>
> PROBLEM:  The date and time from sysdate is different than the date
> and time from date-time, by about 90 seconds.  How do I sync those up?
> Or can I? Is there a better way to display the current date and time
> than using date-time?
>
> Thanks to all past, present, and future respondents.
>
> Joe Johnson
> jejohn1216@surfree.com
>
> ;{)
> http://www.utdallas.edu/~jejohn
> --------------------------------------------------------
> $14.95 Unlimited Internet Access, http://www.surfree.com