Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> date format in ksh

date format in ksh

From: Suhen Pather <Suhen.Pather_at_strandbags.com.au>
Date: Thu, 25 Oct 2001 18:57:10 -0700
Message-ID: <F001.003B5457.20011025190024@fatcity.com>

<span style='font-size:10.0pt;

font-family:Arial'>List,

<span style='font-size:10.0pt;

font-family:Arial'> 

<span style='font-size:10.0pt;

font-family:Arial'>Sorry to deviate from the topic, but

<span style='font-size:10.0pt;

font-family:Arial'>I am writing a korn shell script that would exit if the date format is

<span style='font-size:10.0pt;

font-family:Arial'>incorrect.

<span style='font-size:10.0pt;

font-family:Arial'> 

<span style='font-size:10.0pt;

font-family:Arial'>I just need something to compare the date format passed<span style='mso-spacerun:yes'>  in with DD-MON-YYYY.

<span style='font-size:10.0pt;

font-family:Arial'> 

<span style='font-size:10.0pt;

font-family:Arial'>Eg.

<span style='font-size:10.0pt;

font-family:Arial'>I am passing an argument to my ksh script being the date.

<span style='font-size:10.0pt;

font-family:Arial'>If the date is in any other format but DD-MON-YYYY the ksh must exit.

<span style='font-size:10.0pt;

font-family:Arial'> 

<span style='font-size:10.0pt;

font-family:Arial'>Eg.  sh test.ksh <st1:date Month="2" Day="5" Year="1999">02/05/1999<font face=Arial>

<span style='font-size:10.0pt;

font-family:Arial'> 

<span style='font-size:10.0pt;

font-family:Arial'>It must exit.

<span style='font-size:10.0pt;

font-family:Arial'> 

<span style='font-size:10.0pt;

font-family:Arial'>The only format excepted should be

<span style='font-size:10.0pt;

font-family:Arial'>sh test.ksh 02-MON-YYYY

<span style='font-size:10.0pt;

font-family:Arial'> 

<span style='font-size:10.0pt;

font-family:Arial'>TIA

<span style='font-size:10.0pt;

font-family:Arial'> 

<span style='font-size:10.0pt;

font-family:Arial'>Regards

<span style='font-size:10.0pt;

font-family:Arial'>Suhen

<span style='font-size:10.0pt;

font-family:Arial'> 

<span style='font-size:10.0pt;

font-family:Arial'>  Received on Thu Oct 25 2001 - 20:57:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US