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

  • Home
  • SEARCH
  • 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 8511991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:09:33+00:00 2026-06-11T04:09:33+00:00

Hi I am executing a stored procedure from the function below. On all the

  • 0

Hi I am executing a stored procedure from the function below. On all the dates, I am getting time at the end 19:12:2012 00:00:00 in the datatable. The column is defined as Date in the database and return as Date in the SP. Why am I getting 00:00:00 at the end of the dates?

Thanks.

Sample code.

    Dim dt As New DataTable
    Dim da As New SqlDataAdapter
    Dim con As New SqlConnection(_conString)
    Dim SelectCommand As New SqlCommand()

        With SelectCommand                

            .Parameters.Add(New SqlParameter(_strAcademicYear, SqlDbType.Int))
            .Parameters(_strAcademicYear).Value = _AcademicYear

            .CommandText = "[Teacher].[GetDate]"
            .CommandType = CommandType.StoredProcedure
            .Connection = con
        End With

        da.SelectCommand = SelectCommand
        con.Open()
        da.Fill(dt)
        con.Close()
  • 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-11T04:09:35+00:00Added an answer on June 11, 2026 at 4:09 am

    Because in your datatable, it’s a DateTime. There is no CLR type for just date. The default time for a non-time-specified date is midnight – 00:00:00.

    You can use column data formatting for your gridview, I’m assuming – haven’t worked with one in ages – to properly output the data you want to display.

    Something like

    <asp:boundfield datafield="date"
        dataformatstring="{0:YYYY-MM-DD}"
        htmlencode="false" />
    

    and replace the format string with whatever you’d like it to look like, of course. =)

    (Tag updated as per comment by chridam)

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

Sidebar

Related Questions

I'm having a problem with executing a stored procedure from Perl (using the DBI
I am going to be executing an Update stored procedure from .NET. I want
Sometimes I get the following from SQL Server 2005 when executing a stored procedure:
I am having difficulty executing a MS SQL Server stored procedure from Java/jsp. I
I'm executing one stored procedure from the '.net' code. Since there is a lot
I'm having problems while executing a stored procedure in Oracle. Below is the stored
While executing daoMethod() I am getting the following exception: java.sql.SQLException: Procedure or function 'Get_Books'
I'm executing a stored procedure using GetNamedQuery and setting a string parameter using SetString
How do I combine executing of a stored procedure and using its result or
Guys, I am using SQL Server 2000 and executing the sp_columns stored procedure to

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.