Excel has a method that I have used for some time. Itas much quicker than coding all the permutations etc.
Function xlFormatDate(sDate, sMAP)
' Used to return the date formatted due to QTP not having access to the VB method 'Format', but Excel does :)
' See: http://msdn.microsoft.com/en-us/library/59bz1f0h%28v=vs.90%29.aspx
Set oExcel = CreateObject("excel.application")
xlFormatDate = oExcel.Text(CDate(sDate), sMAP)
Set oExcel = Nothing
The cool thing is that you can get practically any date format out of plenty of randomly formatted date strings supplied by anyone, and then use them how you require them.
While I have been working for Businesses that are Vendor partners with HP, IBM and Microsoft, my opinions and advice is my own.
The solutions provided are either sourced from my own scripting libraries or from a quick Google Search.
I doubt if there is a direct logic to sort this issue - it would be easy if you can write a small logic to display the time as per your required format.
Split the date/time , chk if it is less than 10 and append 0 to it
Will check if we do have any other way and let you know