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()
 
Back
Top