Icon edb_srvdatetime

Returns the current ElevateDB Server date and time for a remote connection.

Syntax
edb_srvdatetime(<ConnectionHandle>)

<ConnectionHandle> =

Handle of connection returned by edb_connect function

Returns
The ElevateDB Server date/time (STRING) if successful,
or FALSE if there are any errors

Usage
The edb_srvdatetime function returns the ElevateDB Server date and time for a remote connection, and returns an empty string for a local connection. The date and time is returned in ANSI standard date and time format (24-hour), which is:

YYYY-MM-DD HH:MM:SS.ZZZ

where YYYY is a 4-digit year, MM is a 2-digit month, DD is a 2-digit day, HH is a 2-digit hour, MM is a 2-digit minute, SS is a 2-digit second, and ZZZ is a 3-digit millisecond.

Examples
<?php

// The following script connects to an ElevateDB
// Server and database, displays the server date/time
// using the edb_srvdatetime() function, and then
// disconnects using the edb_disconnect() function

$con = edb_connect("type=remote;charset=Ansi;address=127.0.0.1;"+
                   "uid=Administrator;pwd=EDBDefault;database=Test");
if (!$con)
  {
  die("Could not connect: " . edb_errmsg());
  }
echo edb_srvdatetime($con);
edb_disconnect($con);
?>
Image