text to date and timezone

Hi Community,

I have custom plugin function to fetch the user system in the form""05/29/2020 16:24 PM" i want to convert it to date and time as it is to store it in database.. i am able to convert using usedatetime () but i am unable to add PM/AM to it.

please suggest me the way to achieve this.

thanks in advance

  Discussion posts and replies are publicly visible