Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: date format in ksh
Jared,
Thanks for the reply.
I am passing a hardcoded date.
I am not getting a date from the
"date" command in ksh.
What my ksh does is retrieves $1 and must check if the date format
is in DD-MON-YY eg. 02-FEB-01.
It uses the hardcoded date (passed in as argument 1) in the script.
If the date is in another format other than above then it must exit.
Regards
Suhen
date +%d-%b-%Y
man date.
You may have to look at the man page on a system with more recent documentation, such as linux. The man page on Solaris is incomplete.
JARed
Suhen Pather <Suhen.Pather_at_strandba To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> gs.com.au> cc: Sent by: Subject: date format in ksh root_at_fatcity.com 10/25/01 08:00 PM Please respond to ORACLE-L
List,
Sorry to deviate from the topic, but
I am writing a korn shell script that would exit if the date format is
incorrect.
I just need something to compare the date format passed in with DD-MON-YYYY. Eg.
I am passing an argument to my ksh script being the date.
If the date is in any other format but DD-MON-YYYY the ksh must exit.
Eg. sh test.ksh 02/05/1999
It must exit.
The only format excepted should be
sh test.ksh 02-MON-YYYY
TIA Regards
Suhen
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Suhen Pather
INET: Suhen.Pather_at_strandbags.com.au
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Fri Oct 26 2001 - 18:50:14 CDT
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
![]() |
![]() |