Re: [GENERAL] Date time value error in Ms Access using pass through queries

2011-09-23 Thread c k
I found the solution. Earlier for 9.0 database I have changed a line as Datestyle= ' ISO, mdy' to DateStyle= "ISO, dmy'. So it was working fine. For 9.1 I forgot to make this change in postgresql.conf. After making the change everything is working fine. Regards, C P Kulkarni On Fri, Sep 23, 2011

Re: [GENERAL] Date time value error in Ms Access using pass through queries

2011-09-23 Thread c k
As I have connected to postgres from MS Access, it thrown the error. Now I have updated ODBC driver, still same problems comes for 9.1 and not for 9.0. There should be some thing that has changed in 9.1 release which prevents from auto-conversion of format of date from client to server. >From packa

Re: [GENERAL] Date time value error in Ms Access using pass through queries

2011-09-22 Thread Adrian Klaver
On Thursday, September 22, 2011 2:25:40 am c k wrote: > It shows error as 'Date/time value out of range' and gives the actual part > of the sql statement which contains date as the details. What program threw the error, Access,ODBC or Postgres? > > I have installed both databases at different lo

Re: [GENERAL] Date time value error in Ms Access using pass through queries

2011-09-22 Thread c k
It shows error as 'Date/time value out of range' and gives the actual part of the sql statement which contains date as the details. I have installed both databases at different locations on same drive on Fedora 15 and accessing it from Windows Xp virtual machine. And both databases from 9.0. and 9

Re: [GENERAL] Date time value error in Ms Access using pass through queries

2011-09-21 Thread Adrian Klaver
On Wednesday, September 21, 2011 3:08:11 am c k wrote: > Hello, > > I got a error yesterday while I have updated my development database to 9.1 > from 9.0.4. I backed up my database from 9.0 and restored in 9.1. It well > successfully. When running a query which calls a function, having date > val

[GENERAL] Date time value error in Ms Access using pass through queries

2011-09-21 Thread c k
Hello, I got a error yesterday while I have updated my development database to 9.1 from 9.0.4. I backed up my database from 9.0 and restored in 9.1. It well successfully. When running a query which calls a function, having date value as IN parameter, it gives me the error as date/time value out of

[GENERAL] Date Time Arithmetic Speed

2009-07-11 Thread Dennis Gearon
I have an application that I am working on that may do some regular, cron generated time date conversions. It would do: DATE + TIME = TIMESTAMP. It would do a LOT of thesebut spread out over every day to keep the load down and allow the server to do it's may job, dish out the results. Wh

Re: [GENERAL] Date/time of last commit

2009-03-09 Thread Richard Huxton
Tom Spencer wrote: > I need to compare the age of some data files against the "age" (i.e. > time of last commit) of the database. If the data files are newer > then the database needs to be rebuilt. > > I can kludge together a solution but by far the cleanest solution > would be to just ask "what

Re: [GENERAL] Date/time of last commit

2009-03-04 Thread Richard Huxton
Tom Spencer wrote: > Is there a way to get the date/time of the last commit on a database? Not unless you're logging them or have triggers on all the tables you want to monitor. What problem are you trying to solve? -- Richard Huxton Archonet Ltd -- Sent via pgsql-general mailing list (pg

[GENERAL] Date/time of last commit

2009-03-03 Thread Tom Spencer
Is there a way to get the date/time of the last commit on a database? Tom -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] date time function

2007-06-29 Thread Michael Glaesemann
On Jun 29, 2007, at 13:17 , John D. Burger wrote: I can't anything in the docs that explain how intervals print out. They seem to show like this: > select now() - '1990-01-01'; ?column? --- 6388 days 13:06:26.3605600595 Without being anchored with a

Re: [GENERAL] date time function

2007-06-29 Thread Tom Lane
"John D. Burger" <[EMAIL PROTECTED]> writes: > Why do the first and third intervals print out differently? The underlying storage is months, days, and seconds --- "1 year" is the same as "12 months", but not the same as "365 days". IIRC plain timestamp subtraction produces an interval with days an

Re: [GENERAL] date time function

2007-06-29 Thread John D. Burger
I can't anything in the docs that explain how intervals print out. They seem to show like this: > select now() - '1990-01-01'; ?column? --- 6388 days 13:06:26.3605600595 or like this: > select now() - current_date; ?column? - 14:06:4

Re: [GENERAL] date time function

2007-06-28 Thread A. Kretschmer
am Thu, dem 28.06.2007, um 16:04:48 -0400 mailte Jasbinder Singh Bali folgendes: > Hi, > > I have a timestamp field in my talbe. > I need to check its difference in days with the current date. > > field name is time_stamp and I did it as follows: > > select age(timestamp '2000-06-28 15:39:47.2

Re: [GENERAL] date time function

2007-06-28 Thread Michael Glaesemann
On Jun 28, 2007, at 15:13 , Raymond O'Donnell wrote: Cast your result to type INTERVAL - something like this: postgres=# select (current_timestamp - timestamp '2007-05-01')::interval; interval -- 58 days 21:10:36.748 (1 row) The cast to interval is superfluous

Re: [GENERAL] date time function

2007-06-28 Thread Raymond O'Donnell
On 28/06/2007 21:04, Jasbinder Singh Bali wrote: How can i convert this result into absolute number of days. Cast your result to type INTERVAL - something like this: postgres=# select (current_timestamp - timestamp '2007-05-01')::interval; interval -- 58 days 21:1

[GENERAL] date time function

2007-06-28 Thread Jasbinder Singh Bali
Hi, I have a timestamp field in my talbe. I need to check its difference in days with the current date. field name is time_stamp and I did it as follows: select age(timestamp '2000-06-28 15:39:47.272045') it gives me something like 6 years 11 mons 29 days 08:20:12.727955 How can i convert th

Re: [GENERAL] Date & Time with time zone

2006-04-10 Thread Tom Lane
"Wei Wei" <[EMAIL PROTECTED]> writes: > A returned value of "select new()" is correct, but the TZ is -7 where > the TZ of OS is set to Pacific Day Time Saving Time. That sounds like PG is working like it's supposed to. > The application is > written with Java. And I use the Java API Calendar cl

Re: [GENERAL] Date & Time with time zone

2006-04-10 Thread Wei Wei
Thanks for your response, Tom. And please see the below. > > In the application, the data is reported as > > > > Sun Apr 09 12:40:52 PDT 2006 - Pacific Standard Time > > > > But, in the DB, it is stated as > > > > 2006-04-09 14:40:53.093-07 > > > > It doesn't seen right to me. Both are on the sa

Re: [GENERAL] Date & Time with time zone

2006-04-10 Thread Tom Lane
"Wei Wei" <[EMAIL PROTECTED]> writes: > In the application, the data is reported as > > Sun Apr 09 12:40:52 PDT 2006 - Pacific Standard Time > > But, in the DB, it is stated as > > 2006-04-09 14:40:53.093-07 > > It doesn't seen right to me. Both are on the same box and the > date column is wit

Re: [GENERAL] Date & Time with time zone

2006-04-10 Thread Wei Wei
Thanks for your reply, Martijn. And see below. > On Sun, Apr 09, 2006 at 12:07:50PM -0800, Wei Wei wrote: > > I try to understand how the D&T information is stored/presented > > in PG. In the application, the data is reported as > > > > Sun Apr 09 12:40:52 PDT 2006 - Pacific Standard Time > > > >

Re: [GENERAL] Date & Time with time zone

2006-04-09 Thread Martijn van Oosterhout
On Sun, Apr 09, 2006 at 12:07:50PM -0800, Wei Wei wrote: > I try to understand how the D&T information is stored/presented in PG. In the > application, the data is reported as > > Sun Apr 09 12:40:52 PDT 2006 - Pacific Standard Time > > But, in the DB, it is stated as > > 2006-04-09 14:40:53.09

[GENERAL] Date & Time with time zone

2006-04-09 Thread Wei Wei
I try to understand how the D&T information is stored/presented in PG. In the application, the data is reported as Sun Apr 09 12:40:52 PDT 2006 - Pacific Standard Time But, in the DB, it is stated as 2006-04-09 14:40:53.093-07 It doesn't seen right to me. Both are on the same box and the date

Re: [GENERAL] date/time function

2005-12-01 Thread Terry Lee Tucker
rnd=# select extract(epoch from timestamp '2002-09-08 05:29:41'); date_part 1031477381 (1 row) See the date/time functions documentation. On Thursday 01 December 2005 04:07 am, Sterpu Victor saith: > I need a function that will transform from the format '2002-09-08 > 05:29:41' to s

Re: [GENERAL] date/time function

2005-12-01 Thread A. Kretschmer
am 01.12.2005, um 11:07:59 +0200 mailte Sterpu Victor folgendes: > I need a function that will transform from the format '2002-09-08 05:29:41' > to seconds since 1970. scholl=# select now(); now --- 2005-12-01 10:18:47.554236+01 (1 row) scholl=# select

[GENERAL] date/time function

2005-12-01 Thread Sterpu Victor
I need a function that will transform from the format '2002-09-08 05:29:41' to seconds since 1970. Thank you. ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Date Time Function / Age

2003-08-29 Thread Bruno Wolff III
On Thu, Aug 28, 2003 at 23:09:44 +0900, Alex <[EMAIL PROTECTED]> wrote: > Hi, > is there an easy way to get the Difference between 2 dates in Days... as > an integer? > > age('date1','date2') results in x years y days or something similar. > but I would like to > have the result in number of

Re: [GENERAL] Date Time Function / Age

2003-08-28 Thread Tom Lane
Alex <[EMAIL PROTECTED]> writes: > is there an easy way to get the Difference between 2 dates in Days... as > an integer? Subtract 'em ... regression=# select '2002-01-01'::date - '2001-01-01'::date; ?column? -- 365 (1 row) regards, tom lane

[GENERAL] Date Time Function / Age

2003-08-28 Thread Alex
Hi, is there an easy way to get the Difference between 2 dates in Days... as an integer? age('date1','date2') results in x years y days or something similar. but I would like to have the result in number of days as an integer. Thanks for your help Alex ---(end of br

[GENERAL] date/time

2001-01-17 Thread snef
Hi, I have read the man's with Postgres. But I can't seem to get Postgres use European time notation (dd/mm/). Where can I adjust this? (in which file?) Snef

Re: [GENERAL] Date & Time

1999-12-03 Thread Peter Eisentraut
On 1999-12-01, Bruce Momjian mentioned: > I am changing my book to use CURRENT_TIMESTAMP rather than now(). I recall Thomas muttering some very promising things about the date/time revolution, including conformance to SQL and ISO formats. Perhaps this could go along with it. At least move the st

Re: [GENERAL] Date & Time

1999-12-02 Thread kaiq
Here is the test. I did not put it in mail because pine did not like cut/paste. now I find a way to do it. It looks good! the conclusion: current_timestamp is "current" -- it should be, the looks closer than now/now() :-) ### test3=

Re: [GENERAL] Date & Time

1999-12-01 Thread Bruce Momjian
> no, you won't ;-) > further testing indicates that current_stamp like current, instead of > now/now(). Now I am confused. You say there is a difference between them? -- Bruce Momjian| http://www.op.net/~candle [EMAIL PROTECTED]| (610) 853-3000 +

Re: [GENERAL] Date & Time

1999-12-01 Thread kaiq
no, you won't ;-) further testing indicates that current_stamp like current, instead of now/now(). also, I remembered (I tried to check the archive, but failed) now() should not be use in where clause, cos it will hurt performance. Kai On Wed, 1 Dec 1999, Bruce Momjian wrote: > > Ed Loehr ha

Re: [GENERAL] Date & Time

1999-12-01 Thread Bruce Momjian
> Ed Loehr ha scritto: > > > Just curious: anyone have any comment on any practical differences between now() >and CURRENT_TIMESTAMP, which seems to work > > the same? > > > > I think it is the same function, both of them return the current date and time. > > now() should be the internal post

Re: [GENERAL] Date & Time

1999-12-01 Thread jose soares
Ed Loehr ha scritto: > Just curious: anyone have any comment on any practical differences between now() >and CURRENT_TIMESTAMP, which seems to work > the same? > I think it is the same function, both of them return the current date and time. now() should be the internal postgreSQL function. a

Re: [GENERAL] Date & Time

1999-12-01 Thread kaiq
now is a constant, while now() is a function. so, to me, it should be always now unless you really need now(). what's more, in my impression, now() is not in any official doc, it is like a rescue for now. however, in this case, seems there is not much difference.-- oops as for current_timesta

[GENERAL] Date time insertion

1999-06-23 Thread Anonymous
I am trying to insert both the date and the time into a datetime field. If the field datetime in table v1 is dt, then the following successfully inserts the date into the datetime field: insert into v1 (date) values ('19990401') ; However, if I also wanted to retain the time of day, the follow