I have got a little problem concerning the conversion of a variable. I get different results if I run the following code on my pc and on my mobile phone:
I get the following messages on my pc:
"633979008000000000"
"6.33979008E+17"
On my phone on the other hand twice I get the message:
"6.33979008E+17"
Is there any way that I also can get the result "633979008000000000"? Or is it just a problem with my mobile phone. I need this information ("01.01." & DateY) for a sql statemtent. I would like to avoid converting "6.33979008E+17" to "633979008000000000".
I have already searched through the forum but I could not find anything. Sorry if this question has been asked and answered in the past.
Thanks in advance for any help.
EDIT:
One line missing in the code at the top --> DateFormat("dd.mm.yyyy")
Thank you for the answer. But unfortunatly i can't round at that point. I need the exact value for the following code:
...
date = DateParse("01.01." & DateY)
Command.SetParameter("date", date)
Command.CommandText = "UPDATE termin SET vereinbart=0, absolviert=0 WHERE (vereinbart=1 OR absolviert=anzahl) AND date<@date"
...
The result is that the sql statement does not update any records. This works on the pc because it has the correct value in @date. This is why I also can't use SubString().
You will probably find that if you compile it on the desktop you will also get the scientific notation when the ticks are converted to string - which is what is happening when you use MsgBox. To format the string the way you want use
These are just different representations of the same value (as counting the digits will show.
Using the Format(test, "d1") function should render the value as a strict integer if required. Unfortunately I tried it and it gives a wrong (negative!) answer. Deeper into bug territory?