- Thu Nov 16, 2017 4:01 pm
#796179
Hello,
I created a before trigger that query some information from the database(dates), but some users are in Asia.
I would like to know if its possible to retrieve the date and change it to the right timezone before inserting the data to the dynaform field
I tried this code but it didn't work:
Regards
I created a before trigger that query some information from the database(dates), but some users are in Asia.
I would like to know if its possible to retrieve the date and change it to the right timezone before inserting the data to the dynaform field
I tried this code but it didn't work:
Code: Select all
Thanks for the help$qry = 'SELECT DATE, COUNTRY FROM DATABASE WHERE user = USERNAME';
$result = executeQuery($qry);
if(is_array($result))
{
if(count($result)>0)
{
foreach($result as $row){
if($row['COUNTRY'] == "Asia"){
$date = new DateTime($row['DATE'], new DateTimeZone('Asia/Singapore'));
@@Date = $date;
}
}
}
}
Regards