Convert DateTime to Number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have question about casting problem DateTime to numer in c#.

ex: VB6 or SQL
Select Cast( Getdate() as int)
result : 38272 (<-- 10/13/2004 )

what is the same casting method aboue DateTime to int32 in C#.

Thank you.
 
I have question about casting problem DateTime to numer in c#.

ex: VB6 or SQL
Select Cast( Getdate() as int)
result : 38272 (<-- 10/13/2004 )

what is the same casting method aboue DateTime to int32 in C#.

I think you're after DateTime.ToOADate()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top