>Try substr(ttoc(datetime()), 12,2) or something similar
>
>>I want to get the value of hour from the system time, but i want the return value in the 12 hour fromat.
>>As i know the hour(datetime()) or hour(time()) also return the 24 hour format even though use set hours to 12 .
>>Any one know how to get it , thanks
>>
There's a funny effect of SET DATE - if you SET DATE SHORT or SET DATE LONG, the time comes back 12 hour format with AM/PM using TTOC(,2). It scoped to the current datasession, and adheres to the Windows date setting for format.
>>regard,
>>chang