Skip to Content
0
Former Member
Jan 18, 2012 at 07:25 AM

Date convertion

37 Views

Hi all,

How to change varchar to date format or varchar length?

I have the source field name as date its datatype is varchar(10) for ex: 2011-12-01 in target i need this as 01122011.

I need to write custom function for this .

i tried this code..

$op_date = to_char($in_date,'ddmmyyyy');

return $op_date ;

instead of 01122011 it shows output like this 1122011 ..

0 is not displaying..

can anyone give me soultion ?

Thanks & regards,

Meena.R