colap Posted July 10, 2011 Share Posted July 10, 2011 Which is valid/better data type for date in postgresql table? Is it date or datetime ? create table dd ( id serial primary key, title varchar(50) not null, created_at date); Quote Link to comment https://forums.phpfreaks.com/topic/241569-postgresql-datetype-question/ Share on other sites More sharing options...
btherl Posted July 10, 2011 Share Posted July 10, 2011 date is fine for storing dates without the time of day. timestamp stores date and time, something like datetime in mysql I believe. Timestamp can be with timezone or without timezone. Quote Link to comment https://forums.phpfreaks.com/topic/241569-postgresql-datetype-question/#findComment-1241009 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.