I am new to ruby and i need help to convert a string of format "dd.mm.yyyy" to date time. Thanks in advance!
Date.strptime('03.02.2001', '%d.%m.%Y')
UPDATE: This will return a Date object
As David rightfully stated below:
DateTime.strptime('03.02.2001', '%d.%m.%Y')
will give you a ruby DateTime object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With