Monday, December 31, 2012

Convert Unix file Creation date into Oracle date


The below code snippet is used to convert the file creation date into oracle date format in unix shell script.
we can get the file creation date of mytextfile.txt and assign into ctime variable. give the ctime variable in oracle insertion script/where clause.
ctime=`stat -c%y mytextfile.txt| sed 's/\..*$//'`

to_date('${lv_ctime}','YYYY-MM-DD HH24:MI:SS')

No comments:

Post a Comment

Oracle Standard Package for Order Totals

  Purpose: Sometimes we need to show line-wise or complete order totals (Basic / Tax / Tax+Basic) in reports. Oracle provides a standard...