Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'Date format' problems with ASP & Oracle

Status
Not open for further replies.

cadbilbao

Programmer
Apr 9, 2001
233
ES
Hi!

I am using ASP to manage my Oracle 8.0.5 on Windows NT.

I've got a problem, because if I SELECT on SQLPlus, I get:
16-JUL-01.

But if I SELECT on ASP, I get: 16/7/01

So I have to tell users to introduce data in that way: DD-MMM-YY, but they see them DD/MM/YY, and they are usually errors, because they mistype data.

What is your recomendation:
+ Must I change Oracle date format?
+ Or must I change ASP date format?

(wich is the way to change date format on Oracle and ASP?)

Best regards.
 
I don't now ASP, but in Oracle you can select the date and change it to any format you want:

Example:

SELECT TO_CHAR(sysdate,'MM/DD/YYYY')
FROM dual;

This will give you 02/20/2001. If you have any Oracle books the formats masks should be in there.
 
I think what you should be doing is changing or setting NLS_DATE_FORMAT parameter in init<db>.ora file of your database in the format you want. So far format is concerned it depends I will set it depending on usage of the users for example dd/mm/yyyy in India mm/dd/yyyy in US.
You need to bounce the database to effect the change.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top