Converting Unix epoch format to normal date for filePro
Fairlight
fairlite at fairlite.com
Thu Jul 22 11:35:56 PDT 2010
The honourable and venerable Larry Hoover spoke thus:
> When you take a Unix epoch formatted date such as: 1240432776, you can
> convert it to a filePro friendly date such as 04/22/09 in Linux with the
> command:
> date +%D --date "Jan 1, 1970 00:00:00 +0000 + 1240432776 seconds"
> I can't seem to find a way to do this in SCO Unix Openserver. The date
> command is different than in Linux. Does anyone know offhand of a
> compatible SCO Unix command to do this, or some way in filePro?
Is perl installed?
perl -e 'print(scalar(localtime($ARGV[0])));' 1240432776
Perl can be had via Skunkware prior to 5.0.6. From 5.0.6 forward, it's
installed as part of the OS install (assuming it wasn't deselected
somehow).
mark->
More information about the Filepro-list
mailing list