• Please check the below points too:

    1. what is you DB server time zone & web server time zone

    2. Are you inserting datetime variable or a varchar variable data

    3. As you are saying that you got error while inserting data, I think you are using varchar string as input. So, please check the server time zone (ddmmyyy) or (mmddyyy).

    I hope this can help.