Need help

Results 1 to 3 of 3

Thread: Need help

  1. #1
    Join Date
    Dec 1969

    Default Need help

    Hi all!<BR><BR>I&#039;ve got this string that holds "9122348" this is the total in seconds. I want to transform this string into "hh:mm:ss" but here is the trick part(for me anyways) if my total is let&#039;s say 5:34:20 PM, I want 17:34:20<BR><BR>can you help me?<BR><BR>To tonec:<BR>If you are reading this thanks for yesterday. your split idea was great but I didn&#039;t need it cause I was told that in the database was a field(float) that contains the total amount in seconds. All I need to do now is use this total in second an format it to get "hh:mm:ss" <BR>thanks <BR>Sincerely<BR>Vlince<BR><BR>

  2. #2
    John mienr Guest

    Default RE: Need help

    Puzzle: 9122348 seconds is more than 105 hours. Is this value supposed to represent part of a day, i.e. less than 24 hours?<BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Need help

    Part I:<BR><BR>secs="3998"<BR>hours=round(Cint(secs)/3600)<BR>secnum=Cint(secs)-(hours*3600)<BR>if secnum&#062;60 then<BR>mins=Int((Cint(secs)-(hours*3600))/60)<BR>else<BR>mins=0<BR>end if<BR>if secnum -(mins*60)&#060;60 then<BR>secs=secnum-(mins*60) mod 3600<BR>end if<BR>response.write hours & ":" & mins & ":" & secs & "<BR>"<BR><BR>Part II<BR><BR>mytime="5:34:34 PM"<BR><BR>Hour(mytime)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts