conversion date datatype to long datatype

  • Thread starter Thread starter raju
  • Start date Start date
hi,
can you explain why u wanna have this conversion ? As you cannot
directly convert from Date to Long datatype. There are few tricks to
get it. Have a look at following:
http://msdn.microsoft.com/library/d.../cpref/html/frlrfsystemdatetimeclasstopic.asp

In VB6 a Date is stored in a Double format using eight bytes. In Visual
Basic.NET, the Date data type uses the .NET common language runtime
DateTime data type, which is an eight-byte integer value.

Besides the change from using eight bytes to using an eight-byte
integer, there are many new properties and methods available from
VB.NET Date type. You can gain some productivity by using these new
features. Because of these different representations, there is no
implicit conversion between the Date and Double data types.

Do you wanna return long value for any specific reason?

Regards,
Bipin Kesharwani
(Developer)
Palewar Techno Solutions
Pocket PC & Mobile Software Development
Nagpur, India

http://www.palewar.com
 
Bipin_Expert said:
hi,
can you explain why u wanna have this conversion ? As you cannot
directly convert from Date to Long datatype. There are few tricks to
get it. Have a look at following:
http://msdn.microsoft.com/library/d.../cpref/html/frlrfsystemdatetimeclasstopic.asp

In VB6 a Date is stored in a Double format using eight bytes. In Visual
Basic.NET, the Date data type uses the .NET common language runtime
DateTime data type, which is an eight-byte integer value.

Besides the change from using eight bytes to using an eight-byte
integer, there are many new properties and methods available from
VB.NET Date type. You can gain some productivity by using these new
features. Because of these different representations, there is no
implicit conversion between the Date and Double data types.

Do you wanna return long value for any specific reason?

Regards,
Bipin Kesharwani
(Developer)
Palewar Techno Solutions
Pocket PC & Mobile Software Development
Nagpur, India

http://www.palewar.com


Hai,

thanks for your reply.

how to detect the inactivity (there is no interaction between user
and system) in windows CE.

I tried with getasynckeystate, but it is working in framework not in
compact framework.

is there any way to identify this.

Regards,
Raju.
 
Back
Top