Equivalent to VBA CLng

Azhar

Active Member
Licensed User
Longtime User
Hi

Is there a way I can use this old VBA code in B4A?

Cstart = CLng(#2/24/1906#)

It will return a long equal to 2247 (the number of days elapsed since 1/Jan/1900 or thereabouts) I may be out one or two days.

Many thanks,

Azhar
 

Jost aus Soest

Active Member
Licensed User
Longtime User
I use type conversation subs like this:
B4X:
Sub CLng(o As Object) As Long
  Return Floor(o)
End Sub

Sub CInt(o As Object) As Int
  Return Floor(o)
End Sub

Sub CStr(o As Object) As String
  Return "" & o
End Sub
 
Upvote 0

Azhar

Active Member
Licensed User
Longtime User
Thanks both for your help. I shall experiment with dateTime and have added CLng functions into my very useful collection!

Thanks again.

Azhar
 
Upvote 0
Top