Hi

I have a oracle function, the function returns a date value.
The return value is in the format of 'DD-MON-YYYYHH24:MI:SS'.

For eg: the value of the variable which is returned is from oracle
function is
" 31-aug-2006 00:00:00 ".
(the data type of the variable is date)

And I am also formatting the return value using to_date in oracle
function.

When I call this function from VB, the returned value will be "20-
AUG-003100:00:00".

Could you please suggest.

Thanks.

Re: Date compatibility in VB and Oracle by Dave

Dave
Mon Jul 23 05:43:52 CDT 2007

As you haven't actually asked a clear question I don't know if this will
help, but you can make Oracle use any specific date/time format by executing
the follow command:
ConnectionOracle.Execute "ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD
HH24:MI:SS';"
(Obviously change the format string to whatever you need).
This alteration will only apply to the connection that it is executed on,
there will be no effect to any other users of the database.

Regards
Dave O.

"sowjanya" <sowjanya.nukala@gmail.com> wrote in message
news:1185176415.904947.325010@w3g2000hsg.googlegroups.com...
> Hi
>
> I have a oracle function, the function returns a date value.
> The return value is in the format of 'DD-MON-YYYYHH24:MI:SS'.
>
> For eg: the value of the variable which is returned is from oracle
> function is
> " 31-aug-2006 00:00:00 ".
> (the data type of the variable is date)
>
> And I am also formatting the return value using to_date in oracle
> function.
>
> When I call this function from VB, the returned value will be "20-
> AUG-003100:00:00".
>
> Could you please suggest.
>
> Thanks.
>