Visual FoxPro General
Check Help on TIME() function. It doesn't require a second parameter, but it would always return 8 chars string. If you don't need seconds, you can just strip them
lcTime = left(time(),5)
This does work the way I want, but I messed up. The datetime is actually a previous datetime stored in a variable. For example, 07/07/2007 12:41:32 AM, and now it is 07/11/2007 12:47:52 PM. When I use left(time(timein),5) it seems to display the time right now, which is 12:47, not 12:41.
timein is the stored variable with the datetime. In this example timein would be equal to 07/07/2007 12:41:32 AM.
Then go with dni's solution. You can also use
lcTime = ttoc(tTime)
=MESSAGEBOX(SUBSTR(m.lcTime,AT(" ", m.lcTime) + 1))
I have SET SECONDS OFF.