user649802
user649802

Reputation: 3253

How to convert datetime variable to string in JavaScript?

How to convert datetime variable to string in JavaScript?

Upvotes: 3

Views: 4343

Answers (3)

David
David

Reputation: 497

I've had a lot of success with Datejs. It took away a lot of pain.

Upvotes: 4

var stringrepresentation = datetimevalue.toString();

Upvotes: 3

Justin Niessner
Justin Niessner

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

Related Questions