Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Mon Aug 21, 2017 3:28 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Postgre SQL - best column type to use for datetime
PostPosted: Tue May 14, 2013 6:23 pm 
Offline

Joined: Sat Dec 04, 2010 9:14 pm
Posts: 918
Hello all,

What is the best column type to use when creating a Postgre SQL date and time column. I prefer to use a column type that accepts SQLdatetime strings, but not sure which of the allowed types I should choose.

Advice anyone?

Thank you,
Tim


Top
 Profile  
Reply with quote  
 Post subject: Re: Postgre SQL - best column type to use for datetime
PostPosted: Tue May 14, 2013 6:37 pm 
Offline

Joined: Sat Oct 01, 2005 5:19 pm
Posts: 3216
http://www.postgresql.org/docs/8.0/stat ... etime.html

Timestamp and continue using SQL date time


Top
 Profile  
Reply with quote  
 Post subject: Re: Postgre SQL - best column type to use for datetime
PostPosted: Tue May 14, 2013 6:59 pm 
Offline
Site Admin
User avatar

Joined: Tue May 06, 2008 1:07 pm
Posts: 1464
Location: NotEvenOnTheMap, CT
Be aware of TIMESTAMP columns that come in both WITH TIME ZONE and WITHOUT TIME ZONE. If you're familiar with SQL DateTime, without time zone is probably most familiar. But I'd recommend using with time zone, PG can do a lot of awesome stuff with timestamps with time zones.

_________________
Thom McGrath - @tekcor
Web Framework Architect, Real Software, Inc.


Top
 Profile  
Reply with quote  
 Post subject: Re: Postgre SQL - best column type to use for datetime
PostPosted: Tue May 14, 2013 7:57 pm 
Offline

Joined: Sat Dec 04, 2010 9:14 pm
Posts: 918
Thanks guys!

One more. Does the datetime stamp occur automatically, or do I provide the date/time?

Thank you again!
Tim


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group