get digits of number

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tracy6001
    New Member
    • Nov 2009
    • 4

    get digits of number

    hi,
    i am trying to part the 24hr timing to hrs and mins

    like if we enter 1730 i hv to get 17 and 30..
    and if i enter 0400 i hv toget 4 and 00..
    and finally i hv to do 1730-0400 where the result should be10.30hrs..
    anybody knows coding in .net vwd2008..
    thanks
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    There are plenty of links on String parsing on the internet.
    Suggest you start by trying out indexing the string as if it were a character array.

    Comment

    • tlhintoq
      Recognized Expert Specialist
      • Mar 2008
      • 3532

      #3
      i hv to do 1730-0400 where the result should be 10.30hrs..
      You should also take some time to learn about the DateTime datatype.

      It has properties for the Hour, the minutes etc. and you can subtract one DateTime from another to get the TimeSpan you are looking for.

      Comment

      Working...