Link to home
Start Free TrialLog in
Avatar of RayT
RayTFlag for United States of America

asked on

Get Client's Time & Date

Is there a way to get the client's date and time with JavaScript?

I can't get the following code to work.

function GetClientDate()
{
var d = new Date();
var dateString = d.toLocaleDateString() + " " + d.toLocaleTimeString();
}
ASKER CERTIFIED SOLUTION
Avatar of scrathcyboy
scrathcyboy
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RayT

ASKER

Thanks