Basically I thought that the regional settings of a report generated using Report Builder 2.0 on a MS SQL Server 2008 instance were dependent on either the server or the client machine. Realised that ...
Applies to:
TravelPort Universal API
PHP 4 or 5
cURL
What?
An article on how to resolve errors and setup a standard ping request using the TravelPort Universal API. This is to be achieved using ...
... to properly convert seconds into total hours, minutes and seconds (taking into account regional settings and without using a date function).
How?
$total_time =intval(intval($total_seconds)/ 3600).":";
$total_time.=str_pad(intval(($total_seconds/60)%60),2,"0",STR_PAD_LEFT).":";
$total_time.=str_pad(intval($total_seconds%60),2,"0",STR_PAD_LEFT);
// ...
My setup
Windows XP SP3
MS SQL Server Management Studio 2008
SQL Server 2008 R2
Regional Setting: London BST (British Summer Time)
Tuesday the 11th of October 2011 at 06:00am:
CONVERT(CHAR(19), ...
... DATEFORMAT dmy returns the date in European format irrespective of the regional settings of either the client or the reporting server.
Removed @GivenDate datetime, from the SQL script
Removed @GivenCampus ...
We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies. Read more about our Privacy Policy.