[FX.php List] Formatting FMP Dates and Times?
Joel Shapiro
jsfmp at earthlink.net
Mon Jun 19 11:53:35 MDT 2006
Hi all
I'm trying to figure out how to format dates and times that are
coming from FileMaker. I've been looking through php.net at Date()
and Time() (as well as related functions; & google) but can't get the
functions to work with my FMP data. They seem to either read the
current Unix timestamp, or 12/31/1969.
DateA and TimeA are date and time fields in FMP.
DATES:
$TData['DateA'][0] // displays as 07/01/2006 (correct, but I'd like
the day)
Date($TData['DateA'][0]) // displays as 07/01/2006 (same)
Date('l n/j/y',$TData['DateA'][0]) // displays as Wednesday
12/31/69 (formatting OK but wrong date)
TIMES:
$TData['TimeA'][0] // displays as 10:00:00 (correct, but I'd like
10:00 am)
Time($TData['TimeA'][0]) // displays as 1150684018 (Unix timestamp?)
Date($TData['TimeA'][0]) // displays as 10:00:00
Date('g:i a',$TData['TimeA'][0]) // displays as 4:00 pm (some
timestamp??, but correct formatting)
Can PHP format dates and times that aren't current Unix timestamps?
Any suggestions?
TIA,
-Joel
More information about the FX.php_List
mailing list