Date Handling Query

After opening the file, make sure all of the values in the “DATEMAT” column are in the current month and current year. Please note, for the “DATEMAT” column, any of the following formats are correct: 16-Feb-23, 02-16-23, 02-16-2023, 02/16/2023, 02/16/23

1 Like

Hi @Sayed_Tabrez1

Welcome to UiPath Community Forum, :smiley:

I’m not able to understand your query, could you please elaborate ?

Hi @Sayed_Tabrez1

Please provide more context about your requirement, also remember for better solutions provide input examples and expected output

Regards!

1 Like

I got excel file where column has date. date any type like(16-Feb-23, 02-16-23, 02-16-2023, 02/16/2023, 02/16/23) bot need to check the date where date is on current month and current year

1 Like

it should handle any format of date

Hi @Sayed_Tabrez1

I’ve created a work flow for it please refer, this will handle any date format in your input excel sheet.
UiPath Forum.zip (10.0 KB)

  1. i’ve assigned todays date to a variable and format i prefer
  2. Read Range to read data from the excel file
  3. used for each loop to check each data row which contains date
  4. Got the date from the cell and assigned to a variable in the format specifed above for todays date
  5. used if actvity and in the condition used string1.contains(string2) to check wheather both the string matches.
1 Like

the code will give error when it can’t identify date format like “10-02-2022” and “02-10-2022”,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.