Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: cf query - wanting to set nls date

Re: cf query - wanting to set nls date

From: Chris ( Val ) <chrisval_at_bigpond.com.au>
Date: 26 Jul 2005 23:07:26 -0700
Message-ID: <1122444446.680492.325450@z14g2000cwz.googlegroups.com>

mike wrote:
> I cant be doing that in my pgm, because i'd have to make a call to see
> what kind of field it is..... and then try to mask it.
>
> The user will be giving me the field: mydate and a date: '7/27/2005'
>
> So, since I can't set nls_date_format before I do this query i'll have
> to change the date in the javascript before I feed it to the sql.
>
> Then I'll get the field: mydate and a date: '27-Jul-2005' and that
> should work fine.

I'm not sure I understand exactly how you will be obtaining input from the user, but might a substitution variable help?

SET VERIFY OFF
VARIABLE date_mask VARCHAR2(15);

COLUMN "Sample Date" FORMAT A11
SELECT TO_DATE('7-Jul-2005', &date_mask ) "Sample Date" FROM DUAL; Enter value for date_mask: 'dd-mon-yyyy'

Sample Date



07-JUL-05 Cheers,
Chris Val Received on Wed Jul 27 2005 - 01:07:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US