formatting result of sum function on time field from mysql into ASP webpage

Posted on 2005-04-27
Last Modified: 2008-03-06

got a table which has a time field hhhh:mm:ss (dont ask why hhhh as i dont care and it does not make a difference)
doing a mysql statement as this

SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(totaltime))) as ttotal from scostudentscores where(rolcourseid='BCLIB')
this basically totals up the time where a field has a certain value... GREAT and i get the correct result of 00:04:00


when i response.write the field into ASP web page i get the current date..... eg 27/04/2005

have tried doing a hour(variable), minute(variable) etc and it gives nme 0:0:0
the session.lcid is for UK which is 2057...  the server the website is running on has the correct timezone... so i need assistance...

thanks in advance


Question by:Cybordax
    1 Comment
    LVL 29

    Accepted Solution

    Dim strTime, mTime
    strTime = "00:40:00"

    mTime = TimeValue(strTime)

    response.write mTime

    Returns a proper time from the string you have.

    It is going to be in the format 12:40:00 AM

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
    Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now