Hi all,I am trying to resolve an issue in previously written code.The issue is no matter what is passed in the 'Date' field during the workflow the following code in the IPL interprets it as 12/31/1969 only.for e.g if date is passed as 2007-12-14,use POSIX qw(locale_h strftime);print POSIX::strftime('%m/%d/%Y %H:%M:%S',localtime(2007-12-24));output:12/31/1969basically the output intended is like this:12/24/07.I read in some previous post that this might be because of the way Unix interprets the dates and strftime function parses it.is there any other alternative to using strftime()?thx in advance..==============================Interwoven certified consultantTS 6.7.1 on RedHat Linux
If your intention is to change the format, use regex to do the same. Highly simple and robust solution to your scenario
Your problem is incorrect localtime argument. localtime(2007-12-24) makes as much (or as little) sense as localtime('boo-foo'). Btw, since you did not use any quotes it is actually an equivalent to localtime(1971)Correct function argument should be a number of non-leap seconds since your system Epoch, normally 00:00:00 GMT, January 1, 1970.
Thanks for the input.Seems it will be quick and dirty.==============================Interwoven certified consultantTS 6.7.1 on RedHat Linux
Not sure why you think, it will be dirty but your wish. My only intention was to suggest an alternative method which you requested.Best Regards,Munish KhannaInterwoven Certified TS 6.0, TS 6.716.7.1 on Windows 2003 EE