It is a handy date time function. We use it on AIX,Solaris,Windows and even 32bit Red Hat but this 64 bit is prewenting a problem.
K$ dtfn -?
Usage: dtfn [-options] Otto P. Bedrosian V1.20 2006-11-10
Default date format is mm/dd/[yy]yy (US) unless specified otherwise.
If date is not entered, system date is substituted if appropriate.
If 2-digit year is entered it will be expanded to 4-digit using
a rolling window based on system date +10 and -90 years.
Valid range of dates is from 1753 to 2799.
${T1} is date and time in the format 'mm/dd/yyyy hh:mi:ss'.
-A months [mm/dd/yyyy] Adjust the date by the number of months.
-a days [mm/dd/yyyy] Adjust the date by the number of days.
-B [mm/dd/yyyy] Beginning of the week (Sunday) for a date.
-b [mm/dd/yyyy] First workday of the month for a date.
-C [mm/dd/yyyy] Day of century for the date.
-c mm/dd/yyyy [mm/dd/yyyy] Compare date1 and date2. Return (date1 - date2).
-D [mm/dd/yyyy] Name of the day for a date (Monday).
-d [mm/dd/yyyy] Abbreviated name of the day for a date (Mon).
-E [mm/dd/yyyy] End of week (Saturday) for a date.
-e [yyyy] Date of Easter for a year.
-F days [mm/dd/yyyy] Adjust the date by the number of workdays.
-f mm/dd/yyyy [mm/dd/yyyy] Workdays between date1 and date2 (inclusive).
-G minutes [${T1}] Adjust the date/time by minutes ('yyyy-mm-dd hh:mi:ss').
-g minutes [${T1}] Adjust the date/time by minutes ('mm/dd/yyyy hh:mi:ss').
-H [yyyy-mm-dd] Abbreviated name of the day for a date (Mon).
-I [yyyy] Daylight Saving Time spring switchover date for US.
-i [yyyy] Daylight Saving Time fall switchover date for US.
-J JD number Date from Julian Date (2,361,222 - 2,743,738).
-j [mm/dd/yyyy] Julian Date number for the date (1753 - 2799).
-K [mm/dd/yyyy] Number of days in a year 'yyyyddd'.
-k [yy][yy]ddd Date from number of days in a year 'mm/dd/yyyy'.
-L [mm/dd/yyyy] Last day of the month for a date.
-l [mm/dd/yyyy] Last workday of the month for a date.
-M [mm/dd/yyyy] Name of the month for the date (January).
-m [mm/dd/yyyy] Abbreviated name of the month for the date (Jan).
-N [mm/dd/yyyy] Work hours in the month for a date (8 hrs/day).
-n weeks [mm/dd/yyyy] Adjust the date by the number of weeks.
-O [dd-MON-yyyy] Convert date from 'dd-MON-yyyy' to 'mm/dd/yyyy'.
-o [mm/dd/yyyy] Convert date from 'mm/dd/yyyy' to 'dd-MON-yyyy'.
-P hours [mm/dd/yyyy] Adjust the date by work hours (8 hrs/day).
-p mm/dd/yyyy [mm/dd/yyyy] Work hours between date1 and date2 (8 hrs/day).
-Q [yyyy-mm-dd] Quarter from date (yyyy-mm-dd to yyyy_qq).
-q [mm/dd/yyyy] Quarter from date (mm/dd/yyyy to yyyy_qq).
-R ${T1} [${T2}] Elapsed time in seconds (input format 'yyyy-mm-dd').
-r ${T1} [${T2}] Elapsed time in 'hh:mi:ss' (input 'yyyy-mm-dd').
-S System date and time (yyyy-mm-dd hh:mi:ss).
-s System date and time (yyyy-mm-dd hh:mi:ss Day).
-T System date and time (mm/dd/yyyy hh:mi:ss).
-t System date and time (mm/dd/yyyy hh:mi:ss Day).
-U ${T1} [${T2}] Elapsed time between two events in seconds.
-u ${T1} [${T2}] Elapsed time between two events in 'hh:mi:ss'.
-V yyyy-mm-dd Verify date: if ok return (yyyy-mm-dd) else '9'.
-v mm/dd/yyyy Verify date: if ok return (mm/dd/yyyy) else '9'.
-W [yyyy-mm-dd] Day of week (0-6, Sunday=0, Monday=1, Saturday=6).
-w [mm/dd/yyyy] Day of week (0-6, Sunday=0, Monday=1, Saturday=6).
-X [mm/dd/yyyy] Date in format 'yyyymmdd_doy_w_Day'.
-x System date and time in 'yyyymmdd_hhmiss_w_Day'.
-Y [yyyy-mm-dd] Convert date from format yyyy-mm-dd to mm/dd/yyyy.
-y [mm/dd/yyyy] Convert date from format mm/dd/yyyy to yyyy-mm-dd.
-Z [dd-mm-yyyy] Convert date from format dd-mm-yyyy to mm/dd/yyyy.
-? or -h List of options. (dtfn -? > dtfn.txt)
oracle@CURRENT-imgsrv1:/oracle/admin/aep_admin/library
K$ dtfn -s
2008-08-29 16:42:37 Fri