Skip to main content
Cadet | Tier 2
November 8, 2023
Question

An exception occurred while parsing the date time

  • November 8, 2023
  • 3 replies
  • 1045 views

Getting An exception occurred while parsing the date time error while trying above code

    3 replies

    Chandrasekhar 7496
    Navigator | Tier 3
    November 9, 2023

    can i know what your excpected out put and what your actually trying to do

     

    Virivinti Chandrasekhar
    Automation Anywhere Team
    November 9, 2023

    Hi @lathab,

    This issue can occur due to several reasons. Here are a few approaches we can try:

    The date format in your bot might not match the system's date format. You can manipulate the source date string to match the system, like converting JUN to Jun, or just use a numeric date instead

    To convert a string containing a date and time to a datetime object using the DateTime:Assign action, use the custom format. This will give you a datetime object in the correct format, which you can then use to extract the year and month using the DateTime:To String action with the custom formats.