Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About rhysdunn

  • Rank

Profile Information

  • Location
  1. Good Morning, I've put together a Query together to gather some Data that I can run on Microsoft Excel and use the data in a pivot table. What I am finding though is that when I reference the pivot table for the "Date" Column on a separate work sheet (Date format is DD/MM/YYYY on the sheet, but displays as YYYY-MM-DD in the pivot Table) I constantly get a REF error. Would It be best to place a Format command in the Query or should I be looking somewhere else to fix this error? I've attached the code below and any help would be appreciated! SET NOCOUNT ON ----------------------------
  2. I've formatted as a date but the error i get is as below [Microsoft][ODBC SQL SQL Server Driver] Conversion failed when converting date and/or time from character string I've formatted though which is the strange thing
  3. Time in the Database is HH:MM:SS But The issue I find in excel is that it puts it with a PM which the system wont recognise
  4. I have written a SQL Query for my Database at work in Excel so that I can automatically update it. Took me a while to figure out the date sections and getting it to return just the current date with the below code. WHERE f.FolioStatusId in (1, 7, 8, 9, 13) AND cast(f.made_on as date) >= cast(getdate() as date) What I'd like to do is to have a section in Excel where I can type the Dates that I need the data from and too. I know that I can insert a "?" in the query section to make a cell reference but cant figure out what code would need to go in the WHERE section to do that.
  • Create New...