time format

D

David M. Fizer

Hello,


I used this my report =FormatDateTime(Time(),4) in a text box to get the
time to display 4 digits. Using Access 2003 it worked well but in Access
97 it didn't. Is there a way to get this to work in Access 97?



TIA,
David
 
B

Brendan Reynolds

=Format(Time(), "hh:nn")

FormatDateTime was new in VBA 6, and Access 2000 was the first version of
Access to use VBA 6. FormatDateTime also works only when the query is
executed within the Microsoft Access environment, you can't use it when the
query is executed by another application, so I generally stick with Format()
even in versions of Access that use VBA 6.
 
Top