Convert 2023-08-02 to 2023 August 2 using robot framework

A filter gives output value as 2023-12-22T12:39:43 and I need to convert this to 2023 December 2,
I am checking if given date and actual date are same or not , in order to validate filter working successfully.

*** Settings ***
Library SeleniumLibrary
Library DateTime

*** Keywords ***
Search in Last modified date filter
${original_date} Set Variable 23-08-02 14:46:27
${converted_date} Convert Date ${original_date} result_format=%Y %B %d
${expected_date} Set Variable 2023 August 2
Should Be Equal As Strings ${converted_date} ${expected_date}

but result output is
ValueError: time data ‘2308-02-14 46:27:00.000000’ does not match format ‘%Y-%m-%d %H:%M:%S.%f’

Here is your test with corrected input format (and I added a 0 to the expected day):

*** Settings ***
Library           SeleniumLibrary
Library           DateTime

*** Test Cases ***
Test Conversion
    Search in Last modified date filter

*** Keywords ***
Search in Last modified date filter
    ${original_date}=    Set Variable    23-08-02 14:46:27
    ${converted_date}=    Convert Date    ${original_date}    date_format=%y-%m-%d %H:%M:%S    result_format=%Y %B %d
    ${expected_date}=    Set Variable    2023 August 02
    Should Be Equal As Strings    ${converted_date}    ${expected_date}

Below is the documentation (RIDE), where you can see the input format:

2 Likes

@HelioGuilherme66 , Thank for the support, It is working fine and date time conversion is done properly.