1832871 Members
3603 Online
110048 Solutions
New Discussion

HP-UX 11 date

 
bursucu
New Member

HP-UX 11 date

Hello,
how do I calculate the yesterday date as so when month is changing not to have day 30 or 29 or 27?

thanks
4 REPLIES 4
Bernhard Mueller
Honored Contributor

Re: HP-UX 11 date

Hi,

whatever you want to accomplish, guess you may find help there.

Clay's Script allows you calculate Julian date which is suitable for a "daily sequencing" purpose (which I assume is what you want).

http://search.hp.com/redirect.html?url=http%3A//forums.itrc.hp.com/cm/QuestionAnswer/1,,0x5a8d93e260b0d611abdb0090277a778c,00.html&qt=datehammer&hit=3

Regards,
Bernhard

aparna challagulla
Valued Contributor

Re: HP-UX 11 date

hi

perl -le 'print scalar localtime time -86400'

HTH
aparna
If you don't have time to do it right you must have time to do it over
Alan Turner
Regular Advisor

Re: HP-UX 11 date

Adapted from the thread on running cron job at the end of the month:

TZ=XYZ+24 date

(it's the +24 which is important, saying that the local time is in a zone 24 hours ahead of GMT.)
bursucu
New Member

Re: HP-UX 11 date

Thank You very much it worked fine.