Re: [GENERAL] Date Formatting for dd/mm/yyyy

2008-07-03 Thread Artacus

J Ottery wrote:

Hi all.
I am using Postgres 8.3 with Windows XP Pro.
System date format is dd/MM/

Having problems when I writing records to a database with a single
'date' type field.


I may be confused here. You say writing was your problem but it sounds 
like the problem is when you read the records out.


The way dates are displayed is dependent on (and configured in) the 
client not on the server. So if you have a specific format you want your 
 dates displayed then you need to convert them to a string in your query.


Artacus

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Date Formatting for dd/mm/yyyy

2008-07-02 Thread J Ottery
Hi all.
I am using Postgres 8.3 with Windows XP Pro.
System date format is dd/MM/

Having problems when I writing records to a database with a single
'date' type field.

e.g.  FieldByName('Date').ASString:='2/2/2003'

When the row is viewed in pgAdmin it is always 1899-12-30

I have tried changing the datestyle in postgresql.conf thus:

datestyle='iso,dmy'
datestyle='dmy'
datestyle='ymd'
datestyle='European'

also

lc_time= 'English_Australia.1252'

(obviously stopping and starting Server)


Nothing seems to make any difference.
Who has got an answer to this.

Also thanks to Craig Ringer and others for answering my earlier
questions, it greatly helped me get up and running with postgres.





-- 
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 Formatting for dd/mm/yyyy

2008-07-02 Thread Klint Gore

J Ottery wrote:

Hi all.
I am using Postgres 8.3 with Windows XP Pro.
System date format is dd/MM/

Having problems when I writing records to a database with a single
'date' type field.

e.g.  FieldByName('Date').ASString:='2/2/2003'
  

What is delphi's ShortDateFormat set to?

Does fieldbyname('Date').asdatetime := strtodate('2/2/2003') make any 
difference?


klint.

--
Klint Gore
Database Manager
Sheep CRC
A.G.B.U.
University of New England
Armidale NSW 2350

Ph: 02 6773 3789  
Fax: 02 6773 3266

EMail: [EMAIL PROTECTED]


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general