Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

SQL Date Interpretation when connecting to Excel

$
0
0

Hi,

It's been a while since I asked for some assistance!

I have a query around some data that I currently have stored in a SQL View which I also want to expose in Excel (via a data connection). The problem is as follows: -

1) In my initial SQL query, I only want to see data within a certain date range. To do this I have a field called PolicyRenewalDate and my range is 1st June 2015 and today's date. (I am in the UK, hence the date format used below): -

Scala
(DPOL.PolicyRenewalDateBETWEEN'01/06/2015'ANDGETDATE())

When I execute this, it gives me my expected results, and I am happy with this. HOWEVER! When I connect Excel to my SQL data, the output seems to reverse my date so I get a date range with a start date of 06/01/2015 not 01/06/2015.
My simple question is why is this happening? Surely, if the query is correct at the source (SQL)...

Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>