Convert [HH:MM AM/PM] String to ISO Date in Mongo DB

706 views Asked by At

I have two string values which contains Start Time and End Time. They are in following format:

StartTime 07:00 AM
EndTime   10:00 PM

I need to check whether Current Date Time is within these Start and End times. Therefore, I need to convert above two strings to ISO datetime.

What is the best way to convert [HH:MM AM/PM] string in to ISO date time in Mongo DB?

0

There are 0 answers