Reputation: 3253
How to convert datetime variable to string in JavaScript?
Upvotes: 3
Views: 4343
Reputation: 37066
var stringrepresentation = datetimevalue.toString();
Upvotes: 3
Reputation: 245479
I have no idea what kind of DateTime variable you're talking about, so I'll assume you're talking about Date
:
var stringVal = someDateVar.toString();
Upvotes: 3