2017-02-08 20:54 GMT+09:00 Djordje Spasic via Ironpython-users
:
> So I need to change:
>
> import time
> date = "JAN/30/2017"
> date_timeStruct = time.strptime(date, "%m/%d/%Y")
>
> To:
>
> import time
> date = "JAN/30/2017"
> date_timeStruct = time.strptime(date, "%b/%d/%Y")
>
> Did I understand
Thank you for the quick response Pawel!
So I need to change:
import timedate = "JAN/30/2017"date_timeStruct = time.strptime(date,"%m/%d/%Y")
To:
import timedate = "JAN/30/2017"date_timeStruct = time.strptime(date,"%b/%d/%Y")
Did I understand that correctly?
And time.strptime(date,"%b/%d/%Y") wi
hi,
prior to 2.7.5, the strptime had a non standard fallback. If a format
didn't match, it tried to guess format.
This is not what standard lib from cpython does. If the string can not be
converted using format, it fails.
In you case %m translates to zero padded month decimal, 01 for January
Try
Hello,
I am using Rhino 5, and Rhino WIP applications shipped with IronPython 2.7.0
and 2.7.5 version respectively.
I have an issue with time.strptime function.
The following code works perfectly on IronPython 2.7.0:
import timedate = "JAN/30/2017"date_timeStruct = time.strptime(date,"%m/%d/%Y")