Solved

excel importing date field as text from sql server

Posted on 2011-02-25
1
212 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 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

770 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