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 8122299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:47:33+00:00 2026-06-06T05:47:33+00:00

I m storing datetime from a calendar extendar and storing it in the database.The

  • 0

I m storing datetime from a calendar extendar and storing it in the database.The Format of the datetime is Format="dddd, MMMM dd, yyyy". Then i m displaying this Datetime with other field in a grid view and naming this field as ‘CalendarDate’. Currently the CalendarDate in the grid is displaying like "6/29/2012 10:42:35 AM".

I want that the Calendar date will display Date like this:-“6/29/2012 10:42 AM”. Only seconds will be removed.Please advise me that how i do this.

The Stored Procedure which i m using now is like this:-

Create procedure St_Proc_GetUserReportforCurrentDayTask 
@userID int 
as            
    Begin            
     set NoCount on;            
     DECLARE @TODAY DATE              
     SET @TODAY = CONVERT(VARCHAR(10), GETDATE(), 111)            
     select Production.CalendarDate 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-06T05:47:35+00:00Added an answer on June 6, 2026 at 5:47 am

    I would suggest you do it on Front end, using DateTime.Tostring() http://www.geekzilla.co.uk/View00FF7904-B510-468C-A2C8-F859AA20581F.htm . SQL Server should be used mainly for Storing the data. The formatting for display should be left to UI you use. This way you can make better use of SQL Server.

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

Sidebar

Related Questions

this is my input to a text box from a datetime calendar and to
how would I format a datetime string received from MySQL? For example, when I
I have this object: class a { public string Application; public DateTime From, To;
I am trying to extract datetime info from 2012/04/03 10:06:21:611747 using format String dateformat
$datetime = new DateTime('0000-00-00 00:00:00'); $date_string = $datetime->format('Y-m-d H:i:s');//-0001-11-30 00:00:00 date gets turned from
SQLite docs specifies that the preferred format for storing datetime values in the DB
I have a DateTime? field. Its currently storing UT. I would like it to
how can i get only the time from the datetime variable? i am storing
I am storing datetime to database as a standard datetime like 2011-10-19 17:18:44.083. I
I need to construct a DateTime object with the date coming from a calendar

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.