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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:10:47+00:00 2026-06-12T00:10:47+00:00

So I have an Excel file with values as 19/09/2011 on a column called

  • 0

So I have an Excel file with values as 19/09/2011 on a column called “Dates”. I selected the entire column in Excel – Format cells – Location: English(UK) and selected the sample value of “14/03/2011” so that the day appears before the month.

Now, using a simple import package in Visual Studio, I imported the data in Sql Server (I used 3 tasks generated by the wizard: Drop table, create table structure in Sql Server, and actual import).

In the create table task, I specified the dates column type as date.
After that, to test the outcome, I selected dates in the Sql Server table ordering it by dates desc.

So I get this, all rumble-jumbled (this is supposed to be only September data, so we should have only “09” after the year):

2011-12-09
2011-11-09
2011-10-09
2011-09-30
2011-09-29
2011-09-28
2011-09-27
2011-09-26
2011-09-25
2011-09-24
2011-09-23
2011-09-22
2011-09-21
2011-09-20
2011-09-19
2011-09-18
2011-09-17
2011-09-16
2011-09-15
2011-09-14
2011-09-13
2011-09-09
2011-08-09
2011-07-09
2011-06-09
2011-05-09
2011-04-09
2011-03-09
2011-02-09
2011-01-09
  • 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-12T00:10:49+00:00Added an answer on June 12, 2026 at 12:10 am

    To get data into a datetime column you can:

    select cast(replace(date_col, '-', '') as datetime)
    

    as strings in the format of yyyymmdd such as 20120928 can always be cast to datetime regardless of the format settings (as they are a certain ISO format).

    To get data out of a table in a particular format you can either CAST or CONVERT or use

    SET DATEFORMAT
    

    e.g.

    SET DATEFORMAT dmy
    GO
    
    SELECT GETDATE()
    

    EDIT: using convert would look like this:

    SELECT CONVERT(VARCHAR(10), GETDATE(), 103)
    

    which returns:

    28/09/2012

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

Sidebar

Related Questions

I have an excel file with 10,000 rows in column A some values are
I have an excel file, validating one column to enter numbers only but it
I have an excel file and I want to read each column and create
I have an Excel file with one column which is filled with numbers. I
I have a dataset and I write it's values to an excel file using
I have an excel file with duplicate values..In SQL table the fields are Primary
I have an excel file that has a column that contains a number of
I have a column in an excel file that contains both strings and numbers.
everybody! I have an Excel file and onclick event my file values must be
I have an Excel file and want to look for the duplicate values in

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.