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

Re: YYYYMMDD format with Oracle

If you are using an Oracle db, you can use Oracles date functions to put the
date in a format that lends it self to comparison via inequalities.

TO_CHAR(to_date('01-JAN-2002'),'YYYYMMDD') &Date_Manipulation
from dual;


Let #Date_Manipulation = To_Number(&Date_Manipulation)

-----Original Message-----
From: Merritt, Bruce [mailto:Merritt@USCOLO.EDU]
Sent: Monday, May 13, 2002 2:10 PM
To: SQR-USERS@list.iex.net
Subject: Re: YYYYMMDD format with Oracle


Try to_char(sysdate,'yyyymmdd') this will work within a select statement.
You can select from dual.


 -----Original Message-----
From:   Ken Boettger [mailto:BoettgeK@CWU.EDU]
Sent:   Monday, May 13, 2002 11:50 AM
To:     SQR-USERS@list.iex.net
Subject:        YYYYMMDD format with Oracle

Can someone suggest a simple alternative to the following statements (which
generate errors):  I am looking for a literal string with out dashes or
slashes... the 8 characters YYYYMMDD without seperators.

$YYYYMMDD = DateToStr($current-date,'yyyymmdd')

$YYYYMMDD = ToChar($current-date,'yyyymmdd')