Format time

  • Thread starter Thread starter simon
  • Start date Start date
S

simon

If I try:
? format(0.1225,"hh:mm:ss")

I should get : 02:56:24

but I don't.

Which is the right function now in .NET?

Thank you,

Simon
 
Have a look at string.format(). In the help section it will list the DateTimeFormatEnum or something like that (VS takes a bit to start up right now). And that will give you a list. I think you can even use

format(0.1225, "Medium Time") but thats some old vb6 stuff covered in the Microsoft.VisualBasic.dll

-CJ

If I try:
? format(0.1225,"hh:mm:ss")

I should get : 02:56:24

but I don't.

Which is the right function now in .NET?

Thank you,

Simon
 
Simon,

Before Jay B has to write that he always forget this (FromDays).

Dim result As String = TimeSpan.FromDays(0.1225).ToString

(Just to show you that with this I have always to think about you Jay)

:-)

Cor
 

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