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: s030e858.027@smtp.gosh.nhs.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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 7.02.00.05 (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,

Mark.

>>> 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
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 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
into?
Can you provide a specific example of a misformatted data value?

regards, tom lane

_______________________________________
Disclaimer: Great Ormond Street Hospital for Children NHS Trust

SECURITY WARNING RE: PATIENT OR OTHER CONFIDENTIAL DATA. Please note
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.

Browse pgsql-sql by date

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