24 Hour Time stamp

Rabbitoh

Registered User.
Local time
Tomorrow, 09:48
Joined
Jul 17, 2006
Messages
34
I have this Function that places the current date into a cell on a worksheet, from a NOW() entry on a FORM:

Function FormatDate(X As String) As Variant
Dim tempDate As Date
If IsDate(X) Then
tempDate = Format(X, "dd/mm/yy")
FormatDate = tempDate
Else
FormatDate = ""
End If
End Function

I need to do the same but saved to a different worksheet cell, also through the use of Now() on a FORM, but in 24 hour TIME format i.e hh:mm - without the "am" and "pm" text being produced (e.g. just the "11:04" or "22:30")
 
not sure about excel, but in access:

hh:nn = 12-hour time and minutes (m = months; n = minutes)

HH:nn = 24-hour time and minutes (m = months; n = minutes)
 
HH:mm = 24 hour time and minutes in Excel
 

Users who are viewing this thread

Back
Top Bottom