Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

In VB6 I could convert Date to a numeric value resulting in the total days since 1899, I need to do the same thing with c# so that I can store the dateTime in a numeric field to make possible searching an Access DataBase using the Between Keyword...

 

How can I do this?

 

int iDataNumeric = DateTimePicker1.Value. ?

  • Leaders
Posted
There's also DTP.Value.ToOADate. That sounds like the kind of date representation that you are using (days since 12/31/1899), however it returns a Date, so you can convert it to a long/int if you need to. :)

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...