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 ChandRank #1 · 393K pointsPosted Jan 24, 2011, 3:46 AM EST
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
Mahesh ChandRank #1 · 393K pointsPosted Jan 24, 2011, 3:46 AM EST
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