PC Review


Reply
Thread Tools Rate Thread

date format in excel imported from an SQL DB.

 
 
Nicawette
Guest
Posts: n/a
 
      23rd Feb 2011
Dear all,

In a table, I have a column with a list of date.
These dates are imported in a excel spreadsheet table via an SQL query
linked to a SQL server (like Table1_data[[#This Row],[Date]]) , and
the data in the DB are in date format.
But excel does not recognize the date unless I enter into the cell and
I hit enter.

e.g.
2009-09-01 = 2009-09-01
but when I hit enter
2009-09-01 = 40057 (excel date format)

Any hint to avoid this manual intervention as I have thousands of
dates :-(

Tx

Nico
 
Reply With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      23rd Feb 2011
Select the column(s) of dates.

Data>Text to columns>Enter usually does the trick.

If not, go a couple steps further and select Date for column data format.


Gord Dibben MS Excel MVP

On Wed, 23 Feb 2011 01:18:06 -0800 (PST), Nicawette <(E-Mail Removed)>
wrote:

>Dear all,
>
>In a table, I have a column with a list of date.
>These dates are imported in a excel spreadsheet table via an SQL query
>linked to a SQL server (like Table1_data[[#This Row],[Date]]) , and
>the data in the DB are in date format.
>But excel does not recognize the date unless I enter into the cell and
>I hit enter.
>
>e.g.
>2009-09-01 = 2009-09-01
>but when I hit enter
>2009-09-01 = 40057 (excel date format)
>
>Any hint to avoid this manual intervention as I have thousands of
>dates :-(
>
>Tx
>
>Nico

 
Reply With Quote
 
Nicawette
Guest
Posts: n/a
 
      24th Feb 2011
Dear Gord,

Thank you, it works

Nice day
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Imported data Date Format BT Microsoft Excel Misc 4 30th Oct 2008 01:39 PM
Imported Date Format Lee Microsoft Excel New Users 3 20th Feb 2008 05:52 AM
Imported Date & Time format with calcs. managed in excel from imrp =?Utf-8?B?VG9kZCBGLg==?= Microsoft Excel Worksheet Functions 0 8th Jul 2005 09:03 PM
Imported Date field will not FORMAT-CELLS as a DATE =?Utf-8?B?RSBM?= Microsoft Excel Misc 1 18th Nov 2004 10:36 PM
Excel displaying American date format on imported data maggie.sharpe@eclipselegal.co.uk Microsoft Excel Worksheet Functions 2 25th Jun 2004 02:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:15 PM.