this time i have another problem concerning the time notation:
my database ouputs the date in a different type than the one my code needs
the date that i get now is like this:
28-8-2006 16:36:00
and the one that i want is:
2006-08-28 16:36
what would be the best way to change this?
this is my code the date is being put out in the variables:
Code: Select all
$Latestcheck
$FirstcheckCode: Select all
<?php
$rs = $objConn->Execute("SELECT TOP 1 LastCheck as Latestcheck, ServerName, Status
FROM Ryuuka_ServerPingStatus
WHERE (ServerName = 'sr0001')
ORDER BY Latestcheck DESC");
$rsa = $objConn->Execute("SELECT TOP 1 LastCheck as Firstcheck, ServerName, Status
FROM ryuuka_ServerPingStatus
WHERE (ServerName = 'sr0001')
ORDER BY Firstcheck ASC");
while (!$rs->EOF) {
$ServerName = $rs->fields['ServerName' ]->value;
$Status = $rs->fields['Status' ]->value;
$Latestcheck = $rs->fields['Latestcheck' ]->value;
$rs->MoveNext();
}
while (!$rsa->EOF){
$Firstcheck = $rsa->fields['Firstcheck' ]->value;
// settype($Firstcheck, "string");
$rsa->MoveNext();
}
?>i've never used that class before