Hi @Jeff Ayers ,
I'm not sure what the result you want is.
The code below may have what you want.
Dim d1 As Double = 12345.6789
Dim d2 As Double
Dim l1 = Convert.ToInt64(d1)
Dim l2 As Long
Dim l3 As Long
Dim ind = d1.ToString.IndexOf(".")
l2 = d1.ToString.Split(".")(0)
l3 = d1.ToString.Replace(".", "")
d2 = l3.ToString.Insert(ind, ".")
d1=12345.6789
l1=12346
Converting directly with convert.toint32 will lose the fractional part and precision
l2=12345
After converting to a string, use split to get the part before the decimal point
l3=123456789
Remove decimal point after converting to string
d2=12345.6789
Add a decimal point in the original position
Hope these are helpful.
Otherwise please provide more information to help us understand what the result you want.
Best Regards.
Jiachen Li
----------
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.