Hi @Hemasai06 you have not provided much detail but since this is asked in UiPath Forum I would assume that you will use the SQL data in UiPath. You can get your SQL table into a datatable then just use “For each row in datatable to “reformat” the date column. Inside for each row, just use an assign
CurrentRow(“Date”) = CurrentRow(“Date”).ToString.Split(” ")(0)
This will overwrite values under the date column with only the fist date part which is dd/MM/yyyy
Hi, Update the Date Format: Convert the dates to a valid SQL date format using the CONVERT function, assuming the dates are stored as text: UPDATE your_table SET Date = CONVERT(DATETIME, SUBSTRING(Date, 1, 16), 103) WHERE ISDATE(SUBSTRING(Date, 1, 16)) = 1;
Filter for the Last 3 Months: Use a SELECT statement with a date filter to get records from the last three months:
*SELECT ** FROM your_table WHERE DATEDIFF(month, CONVERT(DATETIME, SUBSTRING(Date, 1, 16), 103), GETDATE()) <= 3;
Note: Replace your_table with your actual table name and adjust the CONVERT style as needed for your date format.