Re: data converstion from long to int
- From: "Herfried K. Wagner [MVP]" <hirf-spam-me-here@xxxxxx>
- Date: Sun, 4 Dec 2005 13:13:38 +0100
"wb" <none> schrieb:
dim x as long dim z as integer x = datetime.now.tick
z = int(x)
when the coversion takes place an exception error is thrown. maybe it isn't possible to convert a long to an int. But that is what the constructor takes and the help says that time is a good value to pass in.
'Int' will return a floating point number. It's typically get used to remove the fractional part of a number. You may want to use 'CInt' instead which will perform a type conversion. Note that this conversion will fail if 'Ticks'' value cannot be represented in an 'Integer'.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
.
- Follow-Ups:
- References:
- data converstion from long to int
- From: wb
- data converstion from long to int
- Prev by Date: arghhh 64 bit Access oledb struggle
- Next by Date: Re: Best way to download my application
- Previous by thread: Re: data converstion from long to int
- Next by thread: Re: data converstion from long to int
- Index(es):
Relevant Pages
|