LoginSignup
0
0

More than 5 years have passed since last update.

タイムオブジェクトに変換しよう!!

Last updated at Posted at 2017-08-11

日本語表記の時間をタイムオブジェクトに

2017年1月1日 12時30分をタイムオブジェクトへとしていきます。

times = "2017年1月1日 12時30分"
time_data = Time.strptime(times,"%Y年%m月%d日 %H時%M分")
puts time_data

実行結果↓

=> 2017-01-01 12:30:00 +0900
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0