How to correct and update the date field values

Sandhya23
Tera Guru

Hi All,

I have a requirement where I need to correct the date in the field "start_date".

Currently the field has future date, Say for example - 02/12/2022 10:11:33 (2nd of Dec) which is 8 month from now. However I need to alter the value from 2nd Dec to 12th Feb and update the start_date with new value for all the affected records. How can I achieve this ? Any suggestion would be very helpful. thanks !!

Hi @Sanjiv Meher  Do you have any thoughts on this as I found one of your blog on dates fields.

Regards,
Sandhya

1 ACCEPTED SOLUTION

Sandhya23
Tera Guru

Hi Hitoshi,

Here is what I did to resolve my future date issue.

1. Cleared all the future dated values from start_date.

2. Get the source file with correct data and transform the date values in the system.

3. Created a Business Rule to prevent population of any future date.

 

 

 

View solution in original post

9 REPLIES 9

Hi Hitoshi,

The logic is to swap the month and day of current date to day and month respectively on new date for each record if the start_date in future dated. Time remains the same.

How is the new date calculated or it there a field in the table that has the new date?

Its a discovery job that captures the date (correct). However during the process of updating CMDB Database, the dates get converted to future date.

So how should the new date be calculated? If the records were created by discovery, won't it be easier to delete the erroneous records and re-run discovery to re-create them?

Sandhya23
Tera Guru

Hi Hitoshi,

Here is what I did to resolve my future date issue.

1. Cleared all the future dated values from start_date.

2. Get the source file with correct data and transform the date values in the system.

3. Created a Business Rule to prevent population of any future date.