Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #7294
| Newsgroups | comp.lang.ruby |
|---|---|
| Date | 2016-10-21 03:08 -0700 |
| References | <ebcafee9-f008-4196-bdac-981ba31d4229@googlegroups.com> |
| Message-ID | <4f0eec92-c6af-4534-ba27-0cbffeb22878@googlegroups.com> (permalink) |
| Subject | Re: how do i convert this comma delimited string to date object? |
| From | pratap477@gmail.com |
On Friday, September 2, 2016 at 10:18:36 PM UTC+5:30, Junkone wrote:
> I have a string with date and time that are comma delimited in this format. how do I convert it to date object?
> 2013-10-02, 4:30am
Use Time.parse instead of the date parse.
require 'time'
Time.parse('2013-10-02, 4:30am')
Back to comp.lang.ruby | Previous | Next — Previous in thread | Find similar
how do i convert this comma delimited string to date object? Junkone <junkone1@gmail.com> - 2016-09-02 09:48 -0700 Re: how do i convert this comma delimited string to date object? Hasan Diwan <hdiwan@gmail.com> - 2016-09-02 18:19 +0000 Re: how do i convert this comma delimited string to date object? jacki <collector@idealan.pl> - 2016-09-06 09:12 +0200 Re: how do i convert this comma delimited string to date object? pratap477@gmail.com - 2016-10-21 03:08 -0700
csiph-web