+ Reply to Thread
Results 1 to 6 of 6

Changing Imported Date Formats

  1. #1
    Registered User
    Join Date
    12-20-2005
    Posts
    3

    Unhappy Changing Imported Date Formats

    Hi all,

    I have set up an Excel Spreadsheet that imports data from a sql database using the 'external data' function.

    The problem is that the dates being retrieved from the db are in the format 5/12/2005 12:29:59 AM

    I have set excel to display the dates as short dates, ie 05/12/2005 without the time but whilst the date displays correctly if the cell is selected the original date format is still displayed.

    This is preventing me from creating rules and using counting formulas etc

    Can anyone help???? Please....

  2. #2
    Gary''s Student
    Guest

    RE: Changing Imported Date Formats

    Remember that date/time is just a number.

    When you see: 12/20/05 8:05 AM
    the underlying number is 38706.3372719907

    If you want to discard the time, use the =INT() function

    --
    Gary''s Student


    "Craig Lloyd" wrote:

    >
    > Hi all,
    >
    > I have set up an Excel Spreadsheet that imports data from a sql
    > database using the 'external data' function.
    >
    > The problem is that the dates being retrieved from the db are in the
    > format 5/12/2005 12:29:59 AM
    >
    > I have set excel to display the dates as short dates, ie 05/12/2005
    > without the time but whilst the date displays correctly if the cell is
    > selected the original date format is still displayed.
    >
    > This is preventing me from creating rules and using counting formulas
    > etc
    >
    > Can anyone help???? Please....
    >
    >
    > --
    > Craig Lloyd
    > ------------------------------------------------------------------------
    > Craig Lloyd's Profile: http://www.excelforum.com/member.php...o&userid=29769
    > View this thread: http://www.excelforum.com/showthread...hreadid=494842
    >
    >


  3. #3
    Forum Contributor
    Join Date
    11-29-2005
    Posts
    142
    Select the date range and go to Data|Text to Columns. Skip to the 3rd dialogue box and select the Date radio button and make sure the selected format is MDY. Click Finish.

  4. #4
    Registered User
    Join Date
    12-20-2005
    Posts
    3

    Gary - How do i use he INT function?

    Gary - How do i use he INT function?

  5. #5
    Forum Contributor
    Join Date
    11-29-2005
    Posts
    142
    Quote Originally Posted by Craig Lloyd
    Gary - How do i use he INT function?

    For that function, you will need to insert a helper column.

    If you use the Date|Text to Columns method I suggested, you will not need to add a column. The changes are in place.

  6. #6
    Gary''s Student
    Guest

    Re: Changing Imported Date Formats

    If A1 contains the date/time, then in another cell enter =INT(A1).
    --
    Gary''s Student


    "Craig Lloyd" wrote:

    >
    > Gary - How do i use he INT function?
    >
    >
    > --
    > Craig Lloyd
    > ------------------------------------------------------------------------
    > Craig Lloyd's Profile: http://www.excelforum.com/member.php...o&userid=29769
    > View this thread: http://www.excelforum.com/showthread...hreadid=494842
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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