Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はそのように見える文字列を持っています:
"2013/1/16"
次のように、JavaScriptで日付オブジェクトにすばやく変換する方法はありますか?
convertToDateTime("2013/1/16", "yyyy/MM/dd")
とても簡単です。
var myDate = new Date("2013/1/16");
それでうまくいくはずです。Dateオブジェクト のドキュメントをご覧ください
var myDate = new Date( "2013/1/16");
var str = "2013/1/16"; var strToDate = new Date(str);