Here is how you convert the Date field in PHP:
# $arrivaltimestamp is set to value of datetime field from DB
$arrivaldatetime = date("m/j/y g:i a",$arrivaltimestamp);
# $arrivaldatetime will be formatted like '9/26/04 2:49 PM'
As a bonus, here is how to convert Diary fields in PHP:
# $worklog is set to value of diary field from the DB
$array_of_diary_entries = explode('', $worklog);
foreach ($array_of_diary_entries as $i) {
$array_of_entry_parts = explode('', $i);
$date = date('m/j/y g:i:s a', $array_of_entry_parts[0]);
if ($array_of_entry_parts[1] != "") {
print "Date -- $date <br>\n";
print "User -- {$array_of_entry_parts[1]}
<br>\n";
print "Diary Entry -- {$array_of_entry_parts[2]}
<br>\n";
}
}
Bob Palma
[EMAIL PROTECTED]
CIBER, Inc.
732-623-5465 Direct
732-225-1700 Main Number
________________________________
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Brad Welch
Sent: Tuesday, September 26, 2006 2:23 PM
To: [email protected]
Subject: Date Field/PHP conversion
**
Remedy's Date Field doesn't use any kind of conventional timestamping
that PHP provides... does anyone know of a converstion script/function
for PHP to remedy's Date field? Thanks in advance for any help.
ARS 5.1.2
SQL 2000 Server
Windows 2K
__20060125_______________________This posting was submitted with HTML in
it___
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org