Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: to_date format
MattJ83 wrote:
>> Hi Matt, >> >> if your filename consists always of the date followed by an underscore >> followed by something else, then you can just take the substring up to >> the first unterscore: >> TO_DATE(SUBSTR('$filename',1,INSTR('$filename','_')-1),'YYYYMMDDHH24') >> >> >> hth >> Peter
Just continue as with the first part - now we take everything between
the first and the second underscore:
substr('$filename',instr('$filename,'_')+1,instr('$filename','_',1,2)-1)
hth
Peter
Received on Tue Sep 19 2006 - 07:55:52 CDT
![]() |
![]() |