Subversion Repositories DevTools

Rev

Rev 7250 | Rev 7288 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7250 Rev 7277
Line 2195... Line 2195...
2195
       NiceCLng = def
2195
       NiceCLng = def
2196
   End If
2196
   End If
2197
End Function
2197
End Function
2198
 
2198
 
2199
'--------------------------------------------------------------------------------------------------------------------------
2199
'--------------------------------------------------------------------------------------------------------------------------
-
 
2200
' Like CStr, but handles NULL by replacing it with a default value
-
 
2201
Function NiceCStr( val, def)
-
 
2202
   If IsNull(val) Then
-
 
2203
       NiceCStr = def
-
 
2204
   ElseIf IsEmpty(val) Then
-
 
2205
       NiceCStr = def
-
 
2206
   Else
-
 
2207
       NiceCStr = CStr(val)
-
 
2208
   End If
-
 
2209
End Function
-
 
2210
 
-
 
2211
'--------------------------------------------------------------------------------------------------------------------------
2200
' Convert a duration(seconds) into days,hours and seconds. eg 10d 3h 13m 15s
2212
' Convert a duration(seconds) into days,hours and seconds. eg 10d 3h 13m 15s
2201
Function NiceDuration(nDuration)
2213
Function NiceDuration(nDuration)
2202
    NiceDuration = ""
2214
    NiceDuration = ""
2203
    Dim joiner : joiner = ""
2215
    Dim joiner : joiner = ""
2204
    Dim unit
2216
    Dim unit