>Hi Scott:
>
>>
>> Craig is right: you can get the 12 hour format with a simple SET command, and you can get rid of the seconds with SET SECONDS.
>
> Do these settings influence on the character string (time) which returns by adir() function, do you know? Or I still need to convert this string in the right format?
>
>I had written the UDF a)before we had the DATETIME() function :) and b)to get rid of the leading "0" in the time.
Nadya,
No they don't affect character strings. You can convert the date and time strings to a datetime value though;
* lcDate assumed to be MM/DD/YYYY
* lcTime assumed to be HH:MM:SS
ltDateTime = EVAL("{^"+RIGHT(lcDate,4)+"/"+LEFT(lcDate(5)+" " + lcTime +"}")
Now that you have a datatime value you can show it in one textbox with SET HOURS TO 12