TIMENOW



Remarks

* The equivalent JavaScript function is TIMENOW


Public Function TIMENOW( _ 
   ByVal iHour As Integer, _
   ByVal iMinutes As Integer, _
   Optional ByVal iSeconds As Integer = 0) As String

Dim shour As String
Dim sminutes As String
Dim sseconds As String

   shour = iHour
   If Len(shour) = 1 Then shour = "0" & shour

   sminutes = iMinutes
   If Len(sminutes) = 1 Then sminutes = "0" & sminutes

   If (iSeconds = 0) Then
      sseconds = "00"
   Else
      sseconds = iSeconds
      If Len(sseconds) = 1 Then sseconds = "0" & sseconds
   End If
      
   TIMENOW = shour & ":" & sminutes & ":" & sseconds
End Function


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext