now.tolongtimestring.tostring

  • Thread starter Thread starter Greg Chu
  • Start date Start date
G

Greg Chu

Hi,

I used the above and I got

"4:08:16 PM"

but I need

"16:08:16"

Has anyone done this before?

Please help! Thanks!

Greg
 
One way to do it, albeit maybe not the best...

if now.tolongtimestring.substring(instrrev(now.tolongtimestring, " "))
= "PM" then
now.date.addhours(12)
end if
 
Greg,

When you really need it like this, you can use the ToString for setting the
format.

What you want is what I assume
16 hour, 8 minutes, 16 seconds what is used in the my and I think more EU
and other cultures as a kind of standard format for the non analoge clock.
In the USA this is called "military format".

When it is not your standard culture setting, than you can try.

dim mydate as string = Now.toString(HH:mm:ss)

I hope this helps?

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