[HACKERS] Re: [QUESTIONS] Problem with Dates in 6.1
[HACKERS] Re: [QUESTIONS] Problem with Dates in 6.1
От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:
Added to TODO list. > > > I have just upgraded to 6.1, and am having a few problems with dates. One of my databases uses a timestamp. I had to change all of the dates from Eurpean to US in order to reload the data set, but the DateStyle variable doesn't seem to do anything. > > godzone=> select * from WWWWhoStats where UserId = 'lpilkint'; > > userid | date|who |hitcnt|bytecnt > > --------+----------+-----------------------+------+------- > > lpilkint|06-09-1997|its-www1.massey.ac.nz | 2| 3223 > > To clarify, you are using a "date" type, not a "timestamp" type, yes? > > If so, the "date" data type is sensitive to the "European" date style > setting, but does not currently support the "ISO" and "Postgres" styles > of dates. > > If you want that functionality with v6.1, you can use the "datetime" > data type, or the "abstime" type. You will get time fields as well as > dates, however. > > Ah, it just occurred to me that a known bug in the "set datestyle" > command in v6.1 likely kept you from successfully changing the style. > You need to end the parameter list inside the quotes with an extra comma > for the last (or only) argument to be read correctly. > > Type > > SET DateStyle TO 'European,'; > > To get the style to change (and "SHOW DateStyle;" to display the current > setting). > > - Tom > > (I will put it on my ToDo list -- Bruce, can you add this and the same > issues for the "timestamp" type to the official "ToDo"?) > > - -- Bruce Momjian maillist@candle.pha.pa.us ------------------------------