How can I make this code in VBA to become only time, rather than date and time as it is now.
Me.bidTimeCombo = Now()
How can I make this code in VBA to become only time, rather than date and time as it is now.
Me.bidTimeCombo = Now()
Ok, do you know how that could be done using SQL.
I tried this:
and it say undefined function time in expression.Code:SELECT time () as t
I put this in my VBA access,
and I get compile error: Can't find project or library.Code:Me.bidTimeCombo = Time()
It can only work when it is like this,
Code:Me.bidTimeCombo = Now()
the same reason for this error.
https://www.accessforums.net/access/...now-37885.html
AFAIK, Time() is not an intrinsic function. Use Format(). The result will be a string. Why not just save the full date/time? Can always manipulate the value later.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
?time()
6:24:18 PM
works for me with A2010
I am trying Access 2010 and doesn't work. What am I missing? Year(), Month(), Day(), Hour(), Second() all work. Oh, wait, Time() doesn't have an argument. Oh wow!
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Yes I am trying to use the now() and manipulate it, but then I have to cast it back to time after manipulating the dates/time combo. What is AFAIK?
As far as I know AFAIK is an acronym
Dim strTime As String
strTime = Format(Now(), "yyyymmdd_hh:mm:ss")
Me.txtTest.Value = Right(strTime, 8)