When You are working with persian language you might have this problem with 'ي' and 'ك' which they are in arabic format whith this code you can update all of these character to 'ی' and 'ک' in persian character.
You have to relace table_name and field_name with your specific fields Before using this code replace your fields in the code.
It's a sql function which can convert datetime to persian datetime.