Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

excel importing date field as text from sql server

Posted on 2011-02-25
1
Medium Priority
?
219 Views
Last Modified: 2012-05-11
I've set up a data connection to sql server for a pivot table and a date field is coming over as text instead of a date. If I run the same query in sql server management studio, copy the results onto a sheet, that same field is in a date format.
How can I get the data connection to do the same thing?

the field in question source is
CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(Install.StartDate)-1),Install.StartDate),101) AS  Dated

thanks
alan
0
Comment
Question by:avoorheis
1 Comment
 
LVL 21

Accepted Solution

by:
oleggold earned 2000 total points
ID: 34985587
this is mssql function,try to use get external data and microsoft sql server odbc driver to connect ,then put Your formating of the field to date
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question