For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > January 2007 > php dates and postgres









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author php dates and postgres
Natalie Leotta

2007-01-11, 6:59 pm

Hello,

I need to query my db to find out if an entry has been updated since a date
the user enters (mm/dd/yyyy).

Can I do something like the stuff below? Or do I need to do the extract
epoch stuff backwards somehow?

$timestamp = strtotime($user_date);
$postgres_format = date(format info that matches the postgres format,
$timestamp);

and then use $postgres_format to see if something is newer/older when I do
my SQL? When I enter things can I use something similar (if I can't use
now())?

Thanks!

Natalie

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com