Unix Technical Forum

pgsql Date accept hours minutes and seconds

This is a discussion on pgsql Date accept hours minutes and seconds within the pgsql Novice forums, part of the PostgreSQL category; --> Hi again, When I use php's date function to insert a date into the pgsql date field only day ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Novice

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 11:07 PM
roy simkes
 
Posts: n/a
Default pgsql Date accept hours minutes and seconds

Hi again,

When I use php's date function to insert a date into the pgsql date field only day month and year are entered as data and hours minutes and seconds are ignored. php's date function takes a format of date. I use "m-d-Y H:i:s" where m= month, d=day etc... I think that I'm doing something wrong in the format and because of that pgsql ignores the minutes. If this is true what is the right format? Or it should be because of my postgresql.conf filein which date syle is ISO, MDY. Maybe I should change this to something else, but what?

Thanks
__________________________________________________ _______________
Try Live.com: where your online world comes together - with news, sports, weather, and much more.
http://www.live.com/getstarted
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 11:07 PM
ben sewell
 
Posts: n/a
Default Re: pgsql Date accept hours minutes and seconds

Hi Roy,
you need to change the type of field where the date and time is stored to a
timestamp.

Have a look at
http://www.postgresql.org/docs/8.1/s...DATETIME-INPUT
for
more information.

Regards,
Ben


On 8/16/06, roy simkes <roysimkes@hotmail.com> wrote:
>
> Hi again,
>
> When I use php's date function to insert a date into the pgsql date field
> only day month and year are entered as data and hours minutes and seconds
> are ignored. php's date function takes a format of date. I use "m-d-Y
> H:i:s" where m= month, d=day etc... I think that I'm doing something wrong
> in the format and because of that pgsql ignores the minutes. If this is true
> what is the right format? Or it should be because of my postgresql.conffile in which date syle is ISO, MDY. Maybe I should change this to something
> else, but what?
>
> Thanks
>
>
> ------------------------------
> With MSN Spaces email straight to your blog. Upload jokes, photos and
> more. It's free! It's free!<http://clk.atdmt.com/MSN/go/msnnksac0030000001msn/direct/01/?href=http://www.imagine-msn.com/spaces>
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:18 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com