If you use sql server, you can:

Case 1: take substring of text column then convert it to datetime.

Case 2: what's data type of inserteddate? If it's datetime, need to some conversion as in case 1.