Adam Tauno Williams writes:
> OGo=> create index job_date_only on job(extract(date from start_date at
> time zone 'utc'));
> ERROR: timestamp units "date" not recognized
There's no field called "date" in a timestamp. I think what you're
trying to achieve is "date_trunc('day', start_date at tim
On Fri, 2008-10-31 at 08:48 +0100, A. Kretschmer wrote:
> am Thu, dem 30.10.2008, um 14:49:16 -0600 mailte Ryan Hansen folgendes:
> > Hey all,
> > I?m apparently too lazy to figure this out on my own so maybe one of you can
> > just make it easy on me. J
> > I want to index a timestamp field but
Good question.
I'm porting a (never actually finished) app from Firebird to Postgres.
Now that I've re-read how the timestamptz (which Firebird doesn't have)
actually works, I think I'll change the tables and get rid of the
timezone lookup.
Thanks
On 4/03/2012 8:45 PM, hari.fu...@gmail.com
Peter Faulks writes:
> I have two columns in two distinct tables, one is the starting time of
> an event, timestamp without time zone. Data is the utc datetime (for
> sorting across time zones), the other is the number of minutes to add.
Maybe I'm missing something, but why don't you just use ti
Hello
2012/3/1 Peter Faulks :
> Bit more googling and I came up with:
>
> r.utc + CAST( tz.diffmins || ' ' || 'minutes' AS interval)
>
> It works, but is it the best way?
>
r.utc + tz.diffmins * interval '1 minute'
regards
Pavel Stehule
>
> On 1/03/2012 6:50 AM, Peter Faulks wrote:
>>
>> I ha
Bit more googling and I came up with:
r.utc + CAST( tz.diffmins || ' ' || 'minutes' AS interval)
It works, but is it the best way?
On 1/03/2012 6:50 AM, Peter Faulks wrote:
I have two columns in two distinct tables, one is the starting time of
an event, timestamp without time zone. Data is the
I have two columns in two distinct tables, one is the starting time of
an event, timestamp without time zone. Data is the utc datetime (for
sorting across time zones), the other is the number of minutes to add.
I am migrating from Firebird. One of the queries uses the dateadd
function to build
On Thursday 19 January 2012 16:50:53 Steve Crawford wrote:
> I'm sure most here would recommend moving to 9.1 rather than 8.4. Better
> performance, cooler replication functionality, more advanced in-place
> upgrade capabilities for future upgrades, a couple years longer before
> end-of-life, advan
On 01/19/2012 09:17 AM, Samuel Gendler wrote:
On Thu, Jan 19, 2012 at 8:20 AM, Adrian Klaver mailto:adrian.kla...@gmail.com>> wrote:
On Thursday, January 19, 2012 7:59:27 am Gary Stainburn wrote:
> The following code works in 8.4 but not 8.3.
> Anyone know why, or what I need to
On Thu, Jan 19, 2012 at 8:20 AM, Adrian Klaver wrote:
> On Thursday, January 19, 2012 7:59:27 am Gary Stainburn wrote:
> > The following code works in 8.4 but not 8.3.
> > Anyone know why, or what I need to do to change it?
> >
> > SELECT aid, asid,
> >date_range (asdate, afdate)::date AS
On 01/19/2012 07:16 AM, Gary Stainburn wrote:
On Thursday 19 January 2012 15:11:46 Gary Stainburn wrote:
I'll be upgrading my live server as soon as possible, but in the meantime
can anyone suggest a way I can do the same thing using Postgresql 8.1
until I can evaluate 8.4 on my live systems?
I
On Thursday, January 19, 2012 7:59:27 am Gary Stainburn wrote:
> The following code works in 8.4 but not 8.3.
> Anyone know why, or what I need to do to change it?
>
> SELECT aid, asid,
>date_range (asdate, afdate)::date AS asdate,
>acomments
> FROM availability
>
> In 8.4 it retu
The following code works in 8.4 but not 8.3.
Anyone know why, or what I need to do to change it?
SELECT aid, asid,
date_range (asdate, afdate)::date AS asdate,
acomments
FROM availability
In 8.4 it returns the expanded dataset as required. In 8.3 I get:
ERROR: set-valued function
On Thursday 19 January 2012 15:11:46 Gary Stainburn wrote:
> I'll be upgrading my live server as soon as possible, but in the meantime
> can anyone suggest a way I can do the same thing using Postgresql 8.1
> until I can evaluate 8.4 on my live systems?
Sorry, I meant 8.3 as my current version
On Thursday 19 January 2012 08:32:27 hari.fu...@gmail.com wrote:
>
> Why don't you just use the built-in PostgreSQL function for that?
>
> SELECT aid, asid,
>generate_series (asdate, afdate, INTERVAL '1 day')::date AS asdate,
>acomments
> FROM tbl
1) because I didn't know about it
Gary Stainburn writes:
> Hi,
>
> How can I expand a date range in a table to a set of date records?
>
> I have a table of availabilities thus:
>
> Column |Type | Modifiers
> ---+-+-
Hi,
How can I expand a date range in a table to a set of date records?
I have a table of availabilities thus:
Column |Type | Modifiers
---+-+
aid
Petru Ghita writes:
> Hello everybody, I was missing a comparison operator for DATE so I
> wrote one after a really fast look into the documentation.
Huh?
regression=# \do <
List of operators
Schema | Name |Left arg type|
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello everybody, I was missing a comparison operator for DATE so I
wrote one after a really fast look into the documentation. Working
with version 8.4.
create or replace function vav_date_posterior(date, date) RETURNS
boolean AS $$
- -- return TRUE i
the6campbells writes:
> Why is Postgres returning a timestamp instead of the expected date data type
> for the first expression (the second returns a date)?
> select date '2001-03-30' - interval '1' year, date '2001-03-30' - integer
> '365' from tversion
Would you expect a date for
date
Why is Postgres returning a timestamp instead of the expected date data type
for the first expression (the second returns a date)?
In other words, is this a known bug or is it design intent. The manuals did
not seem to appear to say this is intentional behaviour but is not SQL
standard.
select da
Hi,
We have two tables.
select * from
mobile_custodian;
custodian_id | user_id | issue_date | return_date | mobile_no
--+-++-+-
4 | Ben | 2008-10-11 | 2008-10-13 | 09455225998
5 |Josh | 2008-10-15 |
"Ryan Hansen" <[EMAIL PROTECTED]> writes:
> Incidentally, extract(date from ts) doesn't work on my install of 8.3
The field names recognized by extract() are quite well documented
http://www.postgresql.org/docs/8.3/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT
and "date" isn't one of
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of A. Kretschmer
Sent: Friday, October 31, 2008 1:49 AM
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] Date Index
am Thu, dem 30.10.2008, um 14:49:16 -0600 mailte Ryan Hansen folgendes:
> Hey all,
>
>
>
am Thu, dem 30.10.2008, um 14:49:16 -0600 mailte Ryan Hansen folgendes:
> Hey all,
>
>
>
> I?m apparently too lazy to figure this out on my own so maybe one of you can
> just make it easy on me. J
>
>
>
> I want to index a timestamp field but I only want the index to include the
> -mm
On Thu, Oct 30, 2008 at 2:49 PM, Ryan Hansen
<[EMAIL PROTECTED]> wrote:
> Hey all,
>
>
>
> I'm apparently too lazy to figure this out on my own so maybe one of you can
> just make it easy on me. J
>
>
>
> I want to index a timestamp field but I only want the index to include the
> -mm-dd portio
Hey all,
I'm apparently too lazy to figure this out on my own so maybe one of you can
just make it easy on me. J
I want to index a timestamp field but I only want the index to include the
-mm-dd portion of the date, not the time. I figure this would be where
the "expression" portion
>
> A sample of the current results data would be like
> datesales
> 2008-03-07 100.00
> 2007-03-10 150.00
> 2007-03-18 50.00
>
> and what I'm trying to do is fill in the missing dates with sales
> values of 0.
what I do is have a table called days t
On 3/19/08, Christopher Crews <[EMAIL PROTECTED]> wrote:
> and what I'm trying to do is fill in the missing dates with sales values of 0.
create or replace function gen_dates(sd date, ed date)
returns setof date as $$
select $1 + i
from generate_series(0, $2 - $1) i;
$$ language sql immutable;
se
2008/3/19, Christopher Crews <[EMAIL PROTECTED]>:
> Hi All,
> I'm not quite sure how to phrase this, but essentially my company has me
> working on some reports and I have some charts associated with the SQL
> results.
>
> My current query is:
>
> select
> transaction_date as date,
> sum(sa
Hi All,
I'm not quite sure how to phrase this, but essentially my company has me
working on some reports and I have some charts associated with the SQL results.
My current query is:
select
transaction_date as date,
sum(sale_amount) as sales
from ej_transaction
where transaction_date
iuri de araujo sampaio wrote:
hi,
how to change the default format for type date?
I have created a field on a table:
##
create table tbl_inventory (
item_id integer constraint c_pk primary key,
I. purchase_date date,
II. fabrication_date date,
III. ex
Please keep replies on list. Others might have input that will help.
On Jan 24, 2008 11:24 AM, iuri de araujo sampaio <[EMAIL PROTECTED]> wrote:
> Yes, I am trying to insert the string ´2008 7 22´ as a date.
> and i can´t change the input format. Is that a edit the default format
> type date, in
On Jan 24, 2008 2:06 AM, iuri de araujo sampaio <[EMAIL PROTECTED]> wrote:
> hi,
>
> how to change the default format for type date?
> I have created a field on a table:
>
> ##
> create table tbl_inventory (
> item_id integer constraint c_pk primary key,
> I. purchase_date date
On Thursday 24 January 2008 12:06 am, iuri de araujo sampaio wrote:
> hi,
>
> how to change the default format for type date?
> I have created a field on a table:
>
> ##
> create table tbl_inventory (
> item_id integer constraint c_pk primary key,
> I. purchase_date date,
>
am Thu, dem 24.01.2008, um 5:06:58 -0300 mailte iuri de araujo sampaio
folgendes:
> hi,
>
> how to change the default format for type date?
You can change datestyle, a simple example:
test=# select '30.12.2007'::date;
ERROR: date/time field value out of range: "30.12.2007"
HINT: Perhaps you
hi,
how to change the default format for type date?
I have created a field on a table:
##
create table tbl_inventory (
item_id integer constraint c_pk primary key,
I. purchase_date date,
II. fabrication_date date,
III. expiration_date date
);
##
the er
ivan marchesini escreveu:
Dear PG users,
I have an access db and I'm trying to pass all to postgres
I have used mdbtools to export the schema and all went quite well.
then I exported the single tables... to csv..
a lot of table have some timestamp fields containing data as DD/MM/,
and I'm no
On Aug 30, 2007, at 8:01 , ivan marchesini wrote:
a lot of table have some timestamp fields containing data as DD/MM/
,
and I'm no able to copy this table into postgres... because it needs
/MM/DD...
I used \copy...
The input and output formats of dates is controlled by the datestyle
am Thu, dem 30.08.2007, um 15:01:03 +0200 mailte ivan marchesini folgendes:
> Dear PG users,
> I have an access db and I'm trying to pass all to postgres
> I have used mdbtools to export the schema and all went quite well.
> then I exported the single tables... to csv..
>
> a lot of table have so
Dear PG users,
I have an access db and I'm trying to pass all to postgres
I have used mdbtools to export the schema and all went quite well.
then I exported the single tables... to csv..
a lot of table have some timestamp fields containing data as DD/MM/,
and I'm no able to copy this table int
chrisj escreveu:
Hi ALL,
I want to do date arithmetic in SQL with a column that is integer.
example
create table bob (
col1 timestamp
, col2 int4
;
where col2 represents a number of minutes.
I want to do something like
select col1 + interval col2 minutes
from bob
This is doable wi
Hi ALL,
I want to do date arithmetic in SQL with a column that is integer.
example
create table bob (
col1 timestamp
, col2 int4
;
where col2 represents a number of minutes.
I want to do something like
select col1 + interval col2 minutes
from bob
This is doable with most other RDBM
I am a little confused. Where are you casting dateStart and dateEnd? I don't see either in your query. I assume dayOfWeek is a number between 0 and 6, or maybe not?A little more detail would help.Thanks,
Aaron BonoOn 6/15/06, joseppi c <[EMAIL PROTECTED]> wrote:
Hi,I have a table which contains
Hi,
I have a table which contains starttime, endtime and
DOW; i.e. a weekly list of times for when a process
must be started and ended.
TABLE: cronTimes
FIELDS: starttime, endtime, dayOfWeek
I have another table which contains date ranges.
TABLE: dateRanges
FIELDS: dateStart, dateEnd
I need to
While down loading 8.1.3, I tried the following:
update pf_inspectionsBld set insdate[0] = current_date
update pf_inspectionsBld set insdate[1] = current_date
update pf_inspectionsBld set insdate[2] = current_date
update pf_inspectionsBld set insdate[3] = current_date
update pf_inspectionsBld set
Please keep responses copied to the list. This both helps other people with
similar questions by getting the discussion in the archives and helps you
by letting other people see your additional questions.
On Sun, Apr 23, 2006 at 13:21:49 -0500,
"A. R. Van Hook" <[EMAIL PROTECTED]> wrote:
> I am
On Sun, Apr 23, 2006 at 07:55:54 -0500,
"A. R. Van Hook" <[EMAIL PROTECTED]> wrote:
> How do you add null values to a date array?
>
> update dattable set insDate= '{04/12/2006,null}' <-- doesn't work
That is the correct format. However, I think that only works in HEAD
(what will become 8.2
How do you add null values to a date array?
update dattable set insDate = '{04/12/2006,'null'}<-- doesn't work
update dattable set insDate= '{04/12/2006,null}' <-- doesn't work
update dattable set insDate= '{04/12/2006,''}' <-- doesn't work
the table field is defined as insDate d
superboy143 (sent by Nabble.com) wrote:
Hello,
How can I write an sql query in postgresql so that I can insert a date into
a table in the format DD-MM-, and when I select the date from the table
I should get the date in the same format.
See postgresql.conf documentation
(http://www.pos
Ken Hill <[EMAIL PROTECTED]> writes:
> On Fri, 2006-02-10 at 07:38 +0100, A. Kretschmer wrote:
>> You can't define the format in the db, but you can define the
>> output-format with to_char(date, 'DD-MM-');
> You could also try using the data_part() function:
Setting the DateStyle parameter m
On Fri, 2006-02-10 at 07:38 +0100, A. Kretschmer wrote:
am 09.02.2006, um 22:18:09 -0800 mailte superboy143 (sent by Nabble.com) folgendes:
>
> Hello,
>
> How can I write an sql query in postgresql so that I can insert a date into
> a table in the format DD-MM-, and when I select the d
am 09.02.2006, um 22:18:09 -0800 mailte superboy143 (sent by Nabble.com)
folgendes:
>
> Hello,
>
> How can I write an sql query in postgresql so that I can insert a date into
> a table in the format DD-MM-, and when I select the date from the table
> I should get the date in the same format
Hello,
How can I write an sql query in postgresql so that I can insert a date into
a table in the format DD-MM-, and when I select the date from the table
I should get the date in the same format.
--
View this message in context: http://www.nabble.com/date-t1097526.html#a2865031
Sent from the
It works great, very nice method :-)
thanks a lot!
MK
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
In article <[EMAIL PROTECTED]>,
Bruce Momjian writes:
> Magdalena Komorowska wrote:
>> Hi,
>> I hale a problem with counting interwal and I can't find what to do with
>> this.
>> I have two fields in the table:
>> Column | Type | Modifiers
>> -+-+---
>> d
On Tue, Dec 06, 2005 at 11:54:05AM -0500, Bruce Momjian wrote:
> test=> SELECT current_timestamp + cast(x || ' months' AS INTERVAL) FROM
> test;
>?column?
> ---
> 2006-03-06 11:53:05.574279-05
> (1 row)
Or another way:
test=> CREATE TABLE test (x numeric);
Magdalena Komorowska wrote:
> Hi,
> I hale a problem with counting interwal and I can't find what to do with
> this.
> I have two fields in the table:
> Column | Type | Modifiers
> -+-+---
> date_in | date|
> interwal_months | numeric |
>
Hi,
I hale a problem with counting interwal and I can't find what to do with
this.
I have two fields in the table:
Column | Type | Modifiers
-+-+---
date_in | date|
interwal_months | numeric |
-+-+---
Query
On Nov 4, 2005, at 1:17 , Judith Altamirano Figueroa wrote:
Hi everybody, in Postgres 7.0.2 I have the next query:
SELECT * from clientes_proceso where fecha_mod::date <= now() -1;
but in version 8.0.1 returns the next error:
ERROR: The operator doesn't exist: timestamp with time zone - inte
Quoting Judith Altamirano Figueroa <[EMAIL PROTECTED]>:
Hi everybody, in Postgres 7.0.2 I have the next query:
SELECT * from clientes_proceso where fecha_mod::date <= now() -1;
but in version 8.0.1 returns the next error:
ERROR: The operator doesn't exist: timestamp with time zone - integer
How c
Hi everybody, in Postgres 7.0.2 I have the next query:
SELECT * from clientes_proceso where fecha_mod::date <= now() -1;
but in version 8.0.1 returns the next error:
ERROR: The operator doesn't exist: timestamp with time zone - integer
How can drop a day to now()??
beta_jgw=# update scenario1.time_test set local_hour = extract(hour from
to_timestamp(to_char(gmt_date,'-MM-DD')||'
'||to_char(gmt_hour,'99')||':00:00-00','-MM-DD HH24:MI:SS') at time zone
'EST');
Wild guess, but shouldn't that be :00:00:00?
Regards,
Yasir
James G Wilkinson <[EMAIL PROTECTED]> writes:
> I hope that this is some silly beginner's mistake. I have spent quite a bit
> of
> time
> reading the PostgreSQL documentation and cannot find my error. I have also
> scanned the PostgreSQL archive and the web for help, but I have not found
> anyt
beta_jgw=# update scenario1.time_test set local_hour = extract(hour from
to_timestamp(to_char(gmt_date,'-MM-DD')||'
'||to_char(gmt_hour,'99')||':00:00-00','-MM-DD HH24:MI:SS') at time
zone 'EST');
This sounds like a stupid answer, but shouldn't that be :00:00:00?
James G Wilkinson <[EMAIL PROTECTED]> writes:
> beta_jgw=# update scenario1.time_test set local_day = extract(day from
> to_timestamp(to_char(gmt_date,'-MM-DD')||'
> '||to_char(gmt_hour,'99')||':00:00-00','-MM-DD HH24:MI:SS') at time
> zone 'EST');
That seems like a mighty ugly way to d
I hope that this is some silly beginner's mistake. I have spent quite a
bit of time
reading the PostgreSQL documentation and cannot find my error. I have also
scanned the PostgreSQL archive and the web for help, but I have not
found anything
to get me over the hump (it is probably out there, I
Ashok Agrawal wrote:
I need to do date calculation similar to oracle in postgres.
like sysdate - creation_date of the record which returns no
of days in oracle which you can convert to hours or second
by multiplying by 60 or 3600.
How do i achieve this in postgres.
Umm,
SELECT CURRENT_DATE - crea
I need to do date calculation similar to oracle in postgres.
like sysdate - creation_date of the record which returns no
of days in oracle which you can convert to hours or second
by multiplying by 60 or 3600.
How do i achieve this in postgres.
Thanks
Ashok
---(end of
Andrew Hammond <[EMAIL PROTECTED]> writes:
> Should date - date return type integer, not interval?
If we made it return interval then there would be all sorts of timezone
dependencies introduced (think about DST crossings) ... which is
generally something you don't want to think about when doing d
On Fri, Mar 04, 2005 at 15:59:02 -0500,
Andrew Hammond <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Should date - date return type integer, not interval?
Yes. This is in the documentation.
---(end of broadcast)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Should date - date return type integer, not interval?
/* [EMAIL PROTECTED]:5432/test =# */ SELECT ('2005-03-04'::timestamp -
'2005-01-01'::date)::interval;
~ interval
- --
~ 62 days
(1 row)
/* [EMAIL PROTECTED]:5432/test =# */ SELECT ('2005-03-0
t; <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, December 21, 2004 5:38 PM
Subject: Re: [SQL] Date datatype
O Pablo Digonzelli έγραψε στις Dec 20, 2004 :
hi all,
Ca anyone send me an example how to update a date datatype?
for example
update table set birthdate = "200-
O Pablo Digonzelli έγραψε στις Dec 20, 2004 :
> hi all,
> Ca anyone send me an example how to update a date datatype?
> for example
> update table set birthdate = "200-01-01" doesnt work.
# update table set birthdate = '2000-01-01';
>
> TIA
> Pablo
>
>
> ---(end of
om: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Pablo Digonzelli
Sent: Tuesday, December 21, 2004 12:41 AM
To: [EMAIL PROTECTED]
Subject: [SQL] Date datatype
hi all,
Ca anyone send me an example how to update a date datatype?
for example
update table set birthdate = "200-01-
hi all,
Ca anyone send me an example how to update a date datatype?
for example
update table set birthdate = "200-01-01" doesnt work.
TIA
Pablo
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
On Fri, 20 Feb 2004, Silke Trissl wrote:
> Hi,
>
> I have an application where users can enter the date via a web interface.
>
> Recently I upgrated my PostgreSQL version from 7.3 to 7.4.1.
>
> On 7.3 I run several tests about the format of the date and found,
> that Postgres accepts almost eve
Silke Trissl <[EMAIL PROTECTED]> writes:
> On 7.3 I run several tests about the format of the date and found,
> that Postgres accepts almost everything. Today I found out, that 7.4.1
> only accepts dates in the format mm-dd-yy,
It now requires the field order to be what DateStyle says it is. See
Mark Roberts wrote:
Hi im using the function below to insert data into my db; im using
now() to get the timestamptz, however when inserted in the db the format
seems to vary, the majority of the time its in the required European
style but does spontaniously change to various other type can anyone
t
Tom Lane mentioned :
=> Check the manual about runtime
=> configuration settings and postmaster switches.
I use this :
export PGDATESTYLE=
(=ISO,European)
P.S. Is there something wrong with the date on the postgres mailing list machine?
All my mail from the list arrives with a date of
On Wed, Apr 28, 2004 at 16:12:34 +1200,
Ray Jackson <[EMAIL PROTECTED]> wrote:
> Hi,
>
> The following Postgres 7.1 query extracts aggregated data for an
> arbitrary period within each year for sites in a table containing
> 30 years of temperature data.
It isn't completely clear what you want t
Hi,
The following Postgres 7.1 query extracts aggregated data for an
arbitrary period within each year for sites in a table containing
30 years of temperature data.
topo=> \d longterm
Table "longterm"
Attribute | Type | Modifier
---+--+--
site
Stephan Szabo <[EMAIL PROTECTED]> writes:
> You didn't say what version you're using, but IIRC, there was a bug which
> caused the above sort of behavior. I think it was fixed in 7.4 and could
> be fixed in 7.3.x with a catalog change which you might be able to find in
> the archives.
Good memory
On Thu, 18 Mar 2004, Raman wrote:
> In my query of time zone i have details of interval with me like '-9:00',
> '+5:30' etc
>
> my problem is regarding the format of Date which i receive... ie. when I add
> the interval field the results are like:
> Query:
> select current_date at TIME ZONE "inter
Hello All...
In my query of time zone i have details of interval with me like '-9:00',
'+5:30' etc
my problem is regarding the format of Date which i receive... ie. when I add
the interval field the results are like:
Query:
select current_date at TIME ZONE "interval" '+5:30';
timezone
I'm looking for a way, within SQL, given a starting date and an ending
date, to get back the number of months between the start and end date.
If I "SELECT end_date - start_date", I get back an interval in days; I
need months.
Thanks for any suggestions,
Brian
---(end o
I'm still not sure what you were looking for.
If you have, say, March 16th, and the next date is August 23rd, do you
want to count March, April, May, Jun, July, August = 6? Or do you want to
count the number of 30 day periods?
Using date_part gets you the first one.
Plus, since months can be
Sorry, Not looking for a way to extract a month from a timestamp. I'm
looking for a way to convert an interval from days to months. I'm not
sure after digging into it that there is a way to handle it in SQL, as
the interval that results from subtracting one timestamp from another is
not away of
On Friday 20 February 2004 14:58, Silke Trissl wrote:
> Hi,
>
> I have an application where users can enter the date via a web interface.
>
> Recently I upgrated my PostgreSQL version from 7.3 to 7.4.1.
>
> On 7.3 I run several tests about the format of the date and found,
> that Postgres accepts a
Hi,
I have an application where users can enter the date via a web interface.
Recently I upgrated my PostgreSQL version from 7.3 to 7.4.1.
On 7.3 I run several tests about the format of the date and found,
that Postgres accepts almost everything. Today I found out, that 7.4.1
only accepts dates
"Mark Roberts" <[EMAIL PROTECTED]> writes:
> Sure, sorry; Im using postgres version 7.2.1, and the column data type
> is 'timestamptz'
> Data examples:
> 13/02/04 12:35:27 appears in the column as 02/04/13 12:35:27, or
> 13/04/02 12:35:27
> 70% of the time it is inserted in the correct format.
Sure, sorry; Im using postgres version 7.2.1, and the column data type
is 'timestamptz'
Data examples:
13/02/04 12:35:27 appears in the column as 02/04/13 12:35:27, or
13/04/02 12:35:27
70% of the time it is inserted in the correct format.
The function shown in previous email is called by a C
"Mark Roberts" <[EMAIL PROTECTED]> writes:
> Hi im using the function below to insert data into my db; im using
> now() to get the timestamptz, however when inserted in the db the format
> seems to vary, the majority of the time its in the required European
> style but does spontaniously change to
Hi im using the function below to insert data into my db; im using
now() to get the timestamptz, however when inserted in the db the format
seems to vary, the majority of the time its in the required European
style but does spontaniously change to various other type can anyone
throw any light on t
Dnia 2004-02-03 16:51, Użytkownik [EMAIL PROTECTED] napisał:
Hi All
I have an expiration_date column in my table with data type as timestamp.
I need to set that as one year after the current time. how do i do that. I
am getting a casting problem whenever i try something.
something like now()+ 1 yea
--On Tuesday, February 03, 2004 10:51:45 -0500 [EMAIL PROTECTED] wrote:
Hi All
I have an expiration_date column in my table with data type as timestamp.
I need to set that as one year after the current time. how do i do that. I
am getting a casting problem whenever i try something.
something lik
Hi All
I have an expiration_date column in my table with data type as timestamp.
I need to set that as one year after the current time. how do i do that. I
am getting a casting problem whenever i try something.
something like now()+ 1 year. Please let me know
--mohan
--
Lance Munslow <[EMAIL PROTECTED]> writes:
> [ why do these act differently: ]
> select * from test where test_date between '20041001' and '20041101';
> select * from test where test_date between 20041001 and 20041101;
In the latter case the constants are integers, not dates. IMHO the best
policy
I have the following table:
Table "public.test"
Column | Type | Modifiers
---+--+---
test_date | date |
with the following data:
test_date
2004-10-31
2004-11-01
(2 rows)
Why does the query:
select * from test where test_date between '20041001' and
On Friday 26 September 2003 09:18, you wrote:
> I am looking for a way to convert an interval into a number of days (
> integer);
>
> In sybase I would use :
>
> days(today()-r_expire)
SELECT now()::DATE - '1900-12-10'::DATE;
?column?
375
1 - 100 of 176 matches
Mail list logo