+ Reply to Thread
Results 1 to 3 of 3

Issue with Formatting Date Column with Data Extract from SQL Server

  1. #1
    Forum Contributor
    Join Date
    10-07-2011
    Location
    Plano, TX USA
    MS-Off Ver
    Excel 2013
    Posts
    141

    Issue with Formatting Date Column with Data Extract from SQL Server

    I am having an issue with formatting a column from data that I have brought down from SQL Server 2012 (see attached file).

    The data on SQL Server was datetime2(7) although I've also tried just date.

    I changed the format in column A to "Date, 14-Mar-12". Nothing changes. However, if I just put my cursor in the formula bar and then move to another cell, the previous cell changes to the correct format.

    I am using Excel 2013

    Any help on this bizarre behavior is much appreciated.

    Jim
    Attached Files Attached Files
    Last edited by stubbsj; 09-07-2016 at 12:28 PM.
    If I was able to help you, I would appreciate your reputation feedback by using the * icon in the lower left.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Issue with Formatting Date Column with Data Extract from SQL Server

    I don't know what kind of a query you have but try multiplying the date modified by 1. E.g.
    Please Login or Register  to view this content.
    This *might* work. It may force the date modified to a number which Excel will translate back into a date of the format specified.

    A manual process that does work on the Excel side is to put a 1 in an unused cell. Format this to the date format you want (it will read 1-Jan-00). Then copy this cell and highlight the range of dates. Then paste special and check the box "Multiply."
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Contributor
    Join Date
    10-07-2011
    Location
    Plano, TX USA
    MS-Off Ver
    Excel 2013
    Posts
    141

    Re: Issue with Formatting Date Column with Data Extract from SQL Server

    Thanks dflak

    I can try to add another column to the view that gets extracted with the multiply by 1. Problem is, this is a static Excel file that we have that users can use to extract the data from SQL Server. We dump 8 tables into a single Excel file. Only issue is this darn date problem.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Find / Extract last issue dates from column
    By dzoomz65 in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 01-28-2016, 07:04 AM
  2. how to extract data set in excel from sql server
    By aarif_ziaee in forum Excel General
    Replies: 4
    Last Post: 08-22-2013, 04:45 AM
  3. VBA: Using SQL In Excel VBA To Extract Data To Access Or SQL Server
    By stevevb in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-19-2013, 12:24 PM
  4. VBA script to extract data from server
    By crazydude80 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-04-2012, 12:13 AM
  5. [SOLVED] Extract data from SQL Server table into excel using Listbox Selection as criteria
    By abhay_547 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-15-2010, 07:16 AM
  6. [SOLVED] Extract data from SQL Server table into excel
    By abhay_547 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-15-2010, 07:02 AM
  7. Replies: 2
    Last Post: 02-11-2009, 04:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1