Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Craig Lloyd
 
Posts: n/a
Default 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....


--
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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Vito
 
Posts: n/a
Default Changing Imported Date Formats


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.


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=494842

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Craig Lloyd
 
Posts: n/a
Default Changing Imported Date Formats


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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Vito
 
Posts: n/a
Default Changing Imported Date Formats


Craig Lloyd Wrote:
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.


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=494842



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Date 4 changing fields in a line nastech Excel Discussion (Misc queries) 3 October 12th 05 11:49 PM
search for latest date Sue Excel Worksheet Functions 2 August 2nd 05 11:09 PM
Date Formats Bernard Liengme Excel Discussion (Misc queries) 1 July 3rd 05 05:37 PM
troubleshooting date formats 12pt93 Excel Discussion (Misc queries) 3 January 6th 05 04:14 PM
Excel date formats Legal Learning Excel Discussion (Misc queries) 7 January 4th 05 07:13 PM


All times are GMT +1. The time now is 05:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"