Question

An exception occurred while parsing the date time

  • 8 November 2023
  • 3 replies
  • 369 views

Badge +3

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


3 replies

Userlevel 3
Badge +5

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

 

Userlevel 3
Badge +8

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.

Userlevel 3
Badge +5

https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/cloud-date-time-formats.html

Reply