Skip to content

Equivalent Milli Second Generation in c#

balaji mogadali

Asked Jan 24, 2011, 2:28 AM EST1 answer
Share
LinkedInX
hi, i want solution for how to generate milliseconds in c# that must be equivalence to milliseconds in java .
How can i code that?

Pls give rply

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Mahesh Chand
    0
    What are you generating Milliseconds from? A Date? Time? Day? Hours? Min?
    Millisecond is 1 thousand of a second. So you know how to get seconds from an hours, hours from a day, and days from a year.
    So if you have 2 days, 3 hrs and 40 mins, here are your milliseconds.
    Milliseconds = Convert all to Seconds (2 days x 24 hrs a day x 60 minutes an hour x 60 seconds per minute) x 1000
     
    0