Hi all,
I had a file with name as Emp_Names20101028_123245.txt
Now i want to validate the date part ( 20101028_123245 ) in the filename having the format YYYYMMDD HH24:MM:SS.
The date format should be only in the format as shown as above.other wise it should thrown an exception in a plsql procedure.
Declare
l_filename Varchar2(30);
Begin
l_filename = 'Emp_Names20101028_123245.txt'
/* Sql statement to check the format */
Exception
When others
Dbms_output.put_line(" Invalid File date Format");
End;
Edited by: Rede on Dec 1, 2010 12:41 PM