[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: quick and dirty SYSDATE
- Subject: Re: quick and dirty SYSDATE
- From: Pietersz Mark x8394 <mpieters@CITIPOWER.COM.AU>
- Date: Wed, 23 Jun 1999 15:23:50 +1000
Kris
I'm not sure if this is SQR 4 specifc but you can use
let $date = datenow()
where datenow is an SQR function that returns the current date/time from the
host machine.
You can then format it any way you like
eg let $my_variable = datetostr(datenow(),'DD MON YYYY HH:MI:SS')
Rgds
Mark Pietersz
> -----Original Message-----
> From: Krisjanis Gale [SMTP:Krisjanis.Gale@NY.FRB.ORG]
> Sent: Wednesday, 23 June 1999 6:53
> To: Multiple recipients of list SQR-USERS
> Subject: quick and dirty SYSDATE
>
> i believe several of you had discussions in the past about
> reducing the codebase (given by PeopleSoft) for DATETIME's.
> i too have become quite frustrated with the standard set of
> .SQR's - you might call me a bit of an efficiency phreak,
> and they are Anything But.
>
> so without any further ado,
> here's MY datetime procedure...
>
> --
>
> begin-procedure getSysdate
> begin-select
> to_char(sysdate,'mm/dd/yy hh:mi:ss') &SYSDATE
> from dual
> end-select
> let $SYSDATE_DATETIME = &SYSDATE
> unstring $SYSDATE_DATETIME by ' ' into $SYSDATE_TODAY $SYSDATE_NOW
> end-procedure getSysDate
>
> --
>
> this creates three variables:
> $SYSDATE_DATETIME > single-string date and time
> $SYSDATE_TODAY > today's date
> $SYSDATE_NOW > the current time
>
>
> (kris)janis p. gale
> human resources / systems development
> federal reserve bank of new york
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This email message has been swept for the presence of computer viruses.
CitiPower Pty ACN 064 651 056
**********************************************************************