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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:54:18+00:00 2026-06-13T14:54:18+00:00

I have a database with existing data that uses the datetime field which is

  • 0

I have a database with existing data that uses the datetime field which is a timestamp that uses date and time.

I want to just store the date, not the time, as the time is never used anyway but due to the way the app works it is causing inconsistencies when reporting on the data.

I believe there is a ‘date’ data type using the Design view on my table but when I tried to use that it said invalid data type. I also can’t do this using the ALTER TABLE syntax in SQL.

Because it’s live data, I don’t want to make too many changes that might cause problems. We have a demo system that I can play around with though.

  • 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-13T14:54:19+00:00Added an answer on June 13, 2026 at 2:54 pm

    SQL server 2008 has a date datatype, which only stores date

    the easiest way to do is to alter the table like this:

    alter table your_table alter column  <dt_col> date 
    

    Since you cannot alter the table , I think the only way left is convert while selecting

    select convert(date,<dt_col>) from your_table
    

    Or you can create a view with this select statement and use that view in all your queries

    SQL fiddle demo

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

Sidebar

Related Questions

I have a database with existing data, where previously I've been using AUTO_INCREMENT on
I have an existing database(myDatabse) that I created with Microsoft Sql Managenent studio and
I have an existing database with tables which each have 4 partitions (there are
I have an existing database based on SQLiteOpenHelper that has several versions and code
I currently have an iPhone app in the iTunes app store that uses a
Consider a database(MSSQL 2005) that consists of 100+ tables which have primary keys defined
If I have database A, and database B. Database B has existing data... Database
I have customer that uses older, custom built ERP application for which they don't
I have a database that contains data in different languages. Some languages use accents
I have a web site which uses one SQL database but the hosting company

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.