Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8154041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:12:54+00:00 2026-06-06T16:12:54+00:00

I m using a stored procedure and there i m having a column Name

  • 0

I m using a stored procedure and there i m having a column Name timespent which i want to show like HH:MM format only, the procedure is working fine but the only problem is that currently the time spent is coming as hh:mm:ss format. Guide me how i ll get time spent in HH:MM format and correct my procedure if possible.
The procedure is like that:-

CREATE procedure St_Proc_GetUserReportforCurrentDayTask              
@userID int              
as              
Begin              
    set NoCount on;              
    DECLARE @TODAY DATE                
    SET @TODAY = CONVERT(VARCHAR(10), GETDATE(), 111)              
    select CONVERT(VARCHAR,production.CalendarDate,101) + RIGHT (CONVERT(VARCHAR,production.CalendarDate , 100 ) ,7) as Date,               
    RegionAndProjectInfo.RegionProjectName as Region ,              
    County.CountyName as County,              
    WorkType.WorkTypeName as WorkType,              
    Task.TaskName as Task,  
    Production.VolumeProcessed as 'Volumes Processed',              
    Production.TimeSpent as 'Duration (HH:MM)'              
    from Production               
    inner join RegionAndProjectInfo              
    on              
    RegionAndProjectInfo.RegionProjectID=Production.RegionProjectID              
    inner join County              
    on               
    County.CountyID=Production.CountyID              
    inner join WorkType              
    on              
    WorkType.WorkTypeID=Production.WorkTypeID              
    inner join Task              
    on              
    Task.TaskID=Production.TaskID              
    where Production.UserID=@userID and CalendarDate >= @TODAY              
End 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T16:12:55+00:00Added an answer on June 6, 2026 at 4:12 pm

    Try this

    select SUBSTRING( convert(varchar, getdate(),108),1,5)
    

    Replace getdate() with your column name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just created a report in Report Manager using a Stored Procedure which
In asp.net(C#) i want to fetch data from a database using a stored procedure
I want to get the out parameter of stored procedure using Zend framework Here's
I have a stored procedure in which I'm using sub query, but the issue
I'm still getting used to SQL, so before I get to using stored procedure,
Using the stored procedure sp_msforeachtable it's possible to execute a script for all tables
I am using the stored procedure below for the select command of a SqlDataSource,
Entity framework is cripplingly slow so I tried using a stored procedure but I
I am trying to call the stored procedure using subsonic and getting Object Reference
I'm trying to call a stored procedure using ADO .NET and I'm getting the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.