ValueError: time data '1520-18-12 00:00:00.000000' does not match format '%Y-%m-%d %H:%M:%S.%f' in robot...
up vote
0
down vote
favorite
I am trying to convert May 15 2018 12:00 AM
to 05 15 2018 12:00
. But during the conversion process, I am getting the following error message:
ValueError: time data '1520-18-12 00:00:00.000000' does not match
format '%Y-%m-%d %H:%M:%S.%f'
${converted_date}= Convert date May 15 2018 12:00 AM %m %d %Y %H:%M
robotframework
add a comment |
up vote
0
down vote
favorite
I am trying to convert May 15 2018 12:00 AM
to 05 15 2018 12:00
. But during the conversion process, I am getting the following error message:
ValueError: time data '1520-18-12 00:00:00.000000' does not match
format '%Y-%m-%d %H:%M:%S.%f'
${converted_date}= Convert date May 15 2018 12:00 AM %m %d %Y %H:%M
robotframework
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to convert May 15 2018 12:00 AM
to 05 15 2018 12:00
. But during the conversion process, I am getting the following error message:
ValueError: time data '1520-18-12 00:00:00.000000' does not match
format '%Y-%m-%d %H:%M:%S.%f'
${converted_date}= Convert date May 15 2018 12:00 AM %m %d %Y %H:%M
robotframework
I am trying to convert May 15 2018 12:00 AM
to 05 15 2018 12:00
. But during the conversion process, I am getting the following error message:
ValueError: time data '1520-18-12 00:00:00.000000' does not match
format '%Y-%m-%d %H:%M:%S.%f'
${converted_date}= Convert date May 15 2018 12:00 AM %m %d %Y %H:%M
robotframework
robotframework
edited Nov 7 at 9:08
grrigore
568420
568420
asked Nov 7 at 9:05
Poovin
286
286
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
Looks like you have to explicitly provide the format of the the source date, as the keyword did not succeed to automatically deduct it.
The problem is most probably with the beginning of the string, the "May" word in it. In time formatting directives this is %b
; so this should do it:
${converted_date}= Convert date May 15 2018 12:00 AM result_format=%m %d %Y %H:%M date_format=%b %d %Y %H:%M
It's a bit hard to say from just this example is it %b
- the 3 letterer abbreviated version of the month, or %B
- the full name, as May is the only month that the 2 are the same :).
Here's a reference of python's time formatting directives - http://strftime.org.
On executing the above script, I'm getting this error: ValueError: unconverted data remains: AM
– Poovin
Nov 7 at 10:08
1
${converted_date}= Convert date May 15 2018 12:00 AM result_format=%m %d %Y %H:%M date_format=%b %d %Y %H:%M %p resolved the ValueError: unconverted data remains: AM
– Poovin
Nov 7 at 11:13
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Looks like you have to explicitly provide the format of the the source date, as the keyword did not succeed to automatically deduct it.
The problem is most probably with the beginning of the string, the "May" word in it. In time formatting directives this is %b
; so this should do it:
${converted_date}= Convert date May 15 2018 12:00 AM result_format=%m %d %Y %H:%M date_format=%b %d %Y %H:%M
It's a bit hard to say from just this example is it %b
- the 3 letterer abbreviated version of the month, or %B
- the full name, as May is the only month that the 2 are the same :).
Here's a reference of python's time formatting directives - http://strftime.org.
On executing the above script, I'm getting this error: ValueError: unconverted data remains: AM
– Poovin
Nov 7 at 10:08
1
${converted_date}= Convert date May 15 2018 12:00 AM result_format=%m %d %Y %H:%M date_format=%b %d %Y %H:%M %p resolved the ValueError: unconverted data remains: AM
– Poovin
Nov 7 at 11:13
add a comment |
up vote
2
down vote
accepted
Looks like you have to explicitly provide the format of the the source date, as the keyword did not succeed to automatically deduct it.
The problem is most probably with the beginning of the string, the "May" word in it. In time formatting directives this is %b
; so this should do it:
${converted_date}= Convert date May 15 2018 12:00 AM result_format=%m %d %Y %H:%M date_format=%b %d %Y %H:%M
It's a bit hard to say from just this example is it %b
- the 3 letterer abbreviated version of the month, or %B
- the full name, as May is the only month that the 2 are the same :).
Here's a reference of python's time formatting directives - http://strftime.org.
On executing the above script, I'm getting this error: ValueError: unconverted data remains: AM
– Poovin
Nov 7 at 10:08
1
${converted_date}= Convert date May 15 2018 12:00 AM result_format=%m %d %Y %H:%M date_format=%b %d %Y %H:%M %p resolved the ValueError: unconverted data remains: AM
– Poovin
Nov 7 at 11:13
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Looks like you have to explicitly provide the format of the the source date, as the keyword did not succeed to automatically deduct it.
The problem is most probably with the beginning of the string, the "May" word in it. In time formatting directives this is %b
; so this should do it:
${converted_date}= Convert date May 15 2018 12:00 AM result_format=%m %d %Y %H:%M date_format=%b %d %Y %H:%M
It's a bit hard to say from just this example is it %b
- the 3 letterer abbreviated version of the month, or %B
- the full name, as May is the only month that the 2 are the same :).
Here's a reference of python's time formatting directives - http://strftime.org.
Looks like you have to explicitly provide the format of the the source date, as the keyword did not succeed to automatically deduct it.
The problem is most probably with the beginning of the string, the "May" word in it. In time formatting directives this is %b
; so this should do it:
${converted_date}= Convert date May 15 2018 12:00 AM result_format=%m %d %Y %H:%M date_format=%b %d %Y %H:%M
It's a bit hard to say from just this example is it %b
- the 3 letterer abbreviated version of the month, or %B
- the full name, as May is the only month that the 2 are the same :).
Here's a reference of python's time formatting directives - http://strftime.org.
edited Nov 7 at 9:53
answered Nov 7 at 9:44
Todor
4,8282033
4,8282033
On executing the above script, I'm getting this error: ValueError: unconverted data remains: AM
– Poovin
Nov 7 at 10:08
1
${converted_date}= Convert date May 15 2018 12:00 AM result_format=%m %d %Y %H:%M date_format=%b %d %Y %H:%M %p resolved the ValueError: unconverted data remains: AM
– Poovin
Nov 7 at 11:13
add a comment |
On executing the above script, I'm getting this error: ValueError: unconverted data remains: AM
– Poovin
Nov 7 at 10:08
1
${converted_date}= Convert date May 15 2018 12:00 AM result_format=%m %d %Y %H:%M date_format=%b %d %Y %H:%M %p resolved the ValueError: unconverted data remains: AM
– Poovin
Nov 7 at 11:13
On executing the above script, I'm getting this error: ValueError: unconverted data remains: AM
– Poovin
Nov 7 at 10:08
On executing the above script, I'm getting this error: ValueError: unconverted data remains: AM
– Poovin
Nov 7 at 10:08
1
1
${converted_date}= Convert date May 15 2018 12:00 AM result_format=%m %d %Y %H:%M date_format=%b %d %Y %H:%M %p resolved the ValueError: unconverted data remains: AM
– Poovin
Nov 7 at 11:13
${converted_date}= Convert date May 15 2018 12:00 AM result_format=%m %d %Y %H:%M date_format=%b %d %Y %H:%M %p resolved the ValueError: unconverted data remains: AM
– Poovin
Nov 7 at 11:13
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53186308%2fvalueerror-time-data-1520-18-12-000000-000000-does-not-match-format-y-m%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown