Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Strange date problem -- please help !!
Grinberg L. wrote
>What Oracle product makes this swap?
>SQL or PL/SQL engine?
Hmmmm, I cannot find the info I thought I was refering to. That is: I cannot find anything about Oracle swapping day and month to get a good conversion, although some other mapping is done indeed.
So, I guess I was *wrong* here, and cannot explain the behavior Jørgen described:
>01.03.1999 was stored in the database as 03.01.1999!
>(Or 03-JAN-99 as the default dispay shows me)
>
>Now, to the funny (or should I say: The part that drives me nuts !?!) part:
>When I give the Web-app a date with number_of_day_in_ month > 12 (Ex
>25.03.1999) Everything works fine !! I get 25-MAR-99 when i query the dB.
I suppose it is simply caused by the asp web application.
I'll check the paper docs tomorrow but doubt that I'll find something about swapping day and month.
String-to-Date Conversion Rules
The following additional formatting rules apply when converting string values
to date values:
Table 3-19 Oracle Format Matching
Original Format Element
(Additional Format Elements to Try in Place of the Original)
'MM' ('MON' and 'MONTH') 'MON' ('MONTH') 'MONTH' ('MON') 'YY' ('YYYY') 'RR' ('RRRR') ================================================For Oracle Forms:
3.9.8 Default Built-in Date Format Masks
For compatibility with prior releases, if the application's BUILTIN_DATE_FORMAT property is not explicitly set, then Forms will use one of several different format masks, depending upon the type of the "object" being operated on. There are different format masks (or sets of format masks) for DATE2, DATE4, and DATETIME objects.
Here's a breakdown of which objects are considered to be DATE2, DATE4, and DATETIME:
The "builtin" format masks for each type of object are listed below:
DATE2:
DD-MON-YY
DD-MM-SYYYY HH24:MI:SS
DATE4:
DD-MON-YYYY
DD-MM-SYYYY HH24:MI:SS
DATETIME:
DD-MON-YYYY HH24:MI:SS DD-MON-YYYY HH24:MI DD-MM-SYYYY HH24:MI:SS
Note that there are multiple format masks for each type of object. For date-to-string operations, only the first ("primary") format mask is used. The secondary format masks come into play on string-to-date operations: If the string cannot be successfully converted using the primary format mask, the secondary mask(s) are tried, in the order specified above.
Arjan. Received on Tue Mar 09 1999 - 13:41:29 CST
![]() |
![]() |