A Azhar Active Member Licensed User Longtime User Oct 15, 2012 #1 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
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
NJDude Expert Licensed User Longtime User Oct 15, 2012 #2 Take a look at THIS code, also, read the docs for more info about DateTime Upvote 0
J Jost aus Soest Active Member Licensed User Longtime User Oct 15, 2012 #3 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
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
A Azhar Active Member Licensed User Longtime User Oct 16, 2012 #4 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
Thanks both for your help. I shall experiment with dateTime and have added CLng functions into my very useful collection! Thanks again. Azhar