What do you mean by a "sql field"? Sql is not a data type.
And what is timein (time (7) )? I don't recognise that as VFP syntax?
In general, if you want to insert a time into a VFP table, you use the DateTime data type. Unlike some other languages, there is no separate Time data type. You can of course also store times as character fields, for example, "02:50" or "19:30". But that would not enable you to directly perform arithmetic or to compare two times.
You can also use TTOC() to extract the time element from a datetime.
Does that help at all? If not, you will need to clarify your question.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
If you pass 2 as the second parameter of TTOC(), that will give you just the time element. So if ltNow contains the current date and time (e.g. 22/08/22 09:33), then [tt]TTOC(ltNow, 2[/tt]) will return "09:33" as a character string.
If you also want to show the number of seconds, SET SECONDS ON. If you want to show an AM/PM indicator, SET HOURS TO 12.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.