Skip site navigation (1) Skip section navigation (2)

Re: Date format problems

From: "Mark Roberts" <RoberM1(at)gosh(dot)nhs(dot)uk>
To: <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Date format problems
Date: 2004-02-16 15:56:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
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++ Builder 5
program using the postgresSQL ODBC driver version (Insight
Distribution Systems) 

Any other info required ?

Sorry for the stupid questions but im a bit of a n00b, no excuse I
guess, but I just cant figure out whats going on.

Thanks for all your efforts,

Kind Regards,


>>> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 02/16/04 03:34pm >>>
"Mark Roberts" <RoberM1(at)gosh(dot)nhs(dot)uk> 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
> 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 this problem. 

This is way too vague for anyone to help.  What PG version are you
using?  What is the actual datatype of the column you're inserting
Can you provide a specific example of a misformatted data value?

			regards, tom lane

Disclaimer: Great Ormond Street Hospital for Children NHS Trust

that Internet E-mail is simply not a secure communication medium.
We strongly advise that you understand & observe this lack of security
when e-mailing us.

This email and any files transmitted with it are intended solely for
the use of the individual to whom they are addressed.  If you have
received this email in error please notify your email administrator.

Any views or opinions are solely those of the author of this email
and do not represent those of Great Ormond Street Hospital for
Children NHS Trust unless specifically stated.

VIRUSES: This email message has been checked for the presence of
computer viruses by Sophos antivirus software.  However, this does
not guarantee that this email is free of viruses, and the recipient
should perform their own check. 

pgsql-sql by date

Next:From: Mark GibsonDate: 2004-02-16 16:05:17
Subject: Tip: a function for creating a remote view using dblink
Previous:From: Tom LaneDate: 2004-02-16 15:34:18
Subject: Re: Date format problems

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group