The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > AIX
Google UNIX.COM


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
convert date format YYYYMMDD to MM/DD/YYYY nasirgondal Shell Programming and Scripting 7 08-07-2008 06:06 AM
To convert multi format file to a readable ascii format gaur.deepti UNIX for Dummies Questions & Answers 5 03-25-2008 11:03 AM
Convert UTF8 Format file to ANSI format rajreddy UNIX for Dummies Questions & Answers 9 05-25-2007 05:26 AM
convert mmddyy date format to ccyyddd format?? Bhups Shell Programming and Scripting 2 09-27-2006 08:30 PM
how to convert from timestamp to date format in tcsh umen Shell Programming and Scripting 2 11-22-2005 12:51 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-08-2004
Registered User
 

Join Date: Nov 2004
Posts: 3
Stumble this Post!
Unhappy convert date in lilian format for shell (AIX)

hello !

can so help me ? i'm writting a shell srcipt ( UNIX AIX) and I'd like to convert a date as 20041108 in lilian format.

thanks so much
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 11-08-2004
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,449
Stumble this Post!
According to a web site I found:

148138 = 1988-5-16
148139 = 5/17/1988

these are two examples of lilian dates from an IBM website.

Using ksh,

function lil { datecalc -j $(( $1 - 100841)) ; }

defines a function and then "lil 148138" results in "1988 5 16". This function depends on my datecalc script.

And you know where to get datecalc, since it is mentioned in the "Yesterdays Date/Date Arithmetic" article in our FAQ section which you certainly read before you posted your question.

This was an interesting question. I had never heard of lilian date format before. It looks like IBM went to a lot of trouble to re-invent the wheel. As far as I can see, the only difference between lilian date format and the standard mjd is, well, 100,841 days.
Reply With Quote
  #3 (permalink)  
Old 11-09-2004
Registered User
 

Join Date: Nov 2004
Posts: 3
Stumble this Post!
Talking

Thank you so much Perderabo ; I was about to change my algorithm when you answered me ! and ... i found your datecalc script in FAQ !!

Bye !
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 03:52 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0