Excel number / date conversion

I've just pulled some data out of an ODBC connection into Access an
then exported it to Excel.

The dates are currently in the format 20031109. But the built in dat
convertor (from Format Cells) doesn't do anything, even if I convert i
to a 'proper' number first.

How can I convert this to 09/11/2003 so that I can do some date - base
arithmetic and work out difference in days

--
markperr
-----------------------------------------------------------------------
markperry's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2759
View this thread: http://www.excelforum.com/showthread.php?threadid=47112

0
9/27/2005 3:39:59 PM
excel 39879 articles. 2 followers. Follow

3 Replies
3330 Views

Similar Articles

[PageSpeed] 16

Hi

Use this formula
=DATE(MID(A1,1,4),MID(A1,7,2),MID(A1,5,2))


-- 
Regards Ron de Bruin
http://www.rondebruin.nl


"markperry" <markperry.1w0z2b_1127837104.7017@excelforum-nospam.com> wrote in message 
news:markperry.1w0z2b_1127837104.7017@excelforum-nospam.com...
>
> I've just pulled some data out of an ODBC connection into Access and
> then exported it to Excel.
>
> The dates are currently in the format 20031109. But the built in date
> convertor (from Format Cells) doesn't do anything, even if I convert it
> to a 'proper' number first.
>
> How can I convert this to 09/11/2003 so that I can do some date - based
> arithmetic and work out difference in days?
>
>
> -- 
> markperry
> ------------------------------------------------------------------------
> markperry's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=27593
> View this thread: http://www.excelforum.com/showthread.php?threadid=471121
> 


0
rondebruin (3790)
9/27/2005 4:26:19 PM
Select the column and Data>Text to Columns>Next>Next>Column Data
Format>Date>YMD(YDM?)>Finish.


Gord Dibben Excel MVP



On Tue, 27 Sep 2005 10:39:59 -0500, markperry
<markperry.1w0z2b_1127837104.7017@excelforum-nospam.com> wrote:

>
>I've just pulled some data out of an ODBC connection into Access and
>then exported it to Excel.
>
>The dates are currently in the format 20031109. But the built in date
>convertor (from Format Cells) doesn't do anything, even if I convert it
>to a 'proper' number first.
>
>How can I convert this to 09/11/2003 so that I can do some date - based
>arithmetic and work out difference in days?

0
Gord
9/27/2005 5:19:44 PM
Absolute genius - you've saved me a lot of head scratching.

Thanks

--
markperr
-----------------------------------------------------------------------
markperry's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2759
View this thread: http://www.excelforum.com/showthread.php?threadid=47112

0
9/28/2005 10:50:31 AM
Reply:

Similar Artilces:

convert numbers to words
Hi all, simple question, how to convert number to words. ex. $ 10,000 ==> ten thousand dollars thanks hi see this site.... http://support.microsoft.com/?kbid=213360 and this site.... http://www.sulprobil.com/html/spellnumber.html and this site.... http://www.ozgrid.com/VBA/ValueToWords.htm yeah....it can get complicated. good luck. regard FSt1 "reza" wrote: > Hi all, > > simple question, how to convert number to words. > ex. $ 10,000 ==> ten thousand dollars > > thanks FSt1... Thanks "FSt1" wrote: > h...

count between dates help (NETWORKDAYS)
Hello big brains I am trying to find the days and hours between 2 dates 2 columns of dates formated in M/D/YYYY hh:mm 4/23/2004 15:53 and 4/27/2004 10:43 I don't want to count weekends so I used NETWORKDAYS which works to a degree.. giving me 3 (which is days) but it's ignoring the time. I need it to be specific and have it show days and hours difference. I am suprised that it is ignoring it. Unfortunately I am kind of stuck with the dat being in this format. Any help would be appreciated. thanks Maybe this can give you some ideas http://www.cpearson.com/excel/DateTimeWS.ht...

GETPIVOTDATA and Date-type field (Excel 2007)
Data Sample *************** Trip 0346210980 Statement Date 3/24/2010 Description STARBUCKS Date 03/08/2010 LocCurrAmt 3.47 Formula: =GETPIVOTDATA("LocCurrAmt",A6,"Statement Date",DATE(2010,3,24)) Problem: I keep getting a #REF error. When I evaluate the error it's always with the DATE function. Steps I've taken: 1. Confirmed that my date is a number and not text. 2. Tried using the date serial number (40261) instead of the DATE function. 3. Confirmed the GETPIVOTDATA works...

Default Line Weight in Excel
How do I change the default setting for the "Line Weight" when creating charts - at the moment all of my graphs are created with a very thin line weight & I would like the standard to be thicker.... You can't change the default line weight. However, you can create a custom chart with the heavier line weights and then use that custom chart instead of Excel's defaults. To do so, click once on your finished chart with the heavier line weights. Go to the standard toolbar and select Chart -> Chart Type. In the Chart Type dialog box, select the Custom Types tab. ...

Excel Menus Greyed out
This only happens in Excel XP and a re-install and/or repair don't seem to fix it. All other Office apps are fine. Anyone seen this? Remedy?! ...

Exchange 2003 System Manager Server Modified Date Meaning
Hi, I am looking for some info on the Exchange 2003 system manager server property page. It shows in the right hand colum all the servers and service packs and the furthest right says "modified date" Could some one please eleborate on what this actually means? Thanks On Tue, 31 Jan 2006 06:20:28 -0800, Darrel <Darrel@discussions.microsoft.com> wrote: >Hi, > >I am looking for some info on the Exchange 2003 system manager server >property page. It shows in the right hand colum all the servers and service >packs and the furthest right says "modified d...

Excel cannot open email program.
I often use "file.. send to... mail recipient" to send a spreadsheet as text in the body of an e-mail. I prefer that to sending excel as an attachment, since my recipients may not have excel and usually don't need to see formulas. On my new computer however I get the message "excel could not open the e-mail program" if I try the first option above. Both excel 2002 and outlook 2002 are working fine. I "repaired" office just to be sure. Still doesn't work. Only difference is that the computer came with a trial version of office 2003 which I don...

a sample question about excel VBA
How can I make msgbox like this? �� there are X sheets of this workbook the first page name is : Sheets(1).Name the secod page name is : Sheets(2).Name �� until to the last page the X page mane is : Sheets(X).Name How can I write this module? Sub WorksheetNames() Dim i As Long Dim strAnswer As String strAnswer = _ "There are " & Worksheets.Count & _ " sheets of this workbook" For i = 1 To Worksheets.Count strAnswer = strAnswer & vbCr & _ "Sheet " & i & " : " & _...

access / excel link
i know that i can link excel tables to an access database. can i link an access table to a spreadsheet? -- TomMurray hi Tom, tom wrote: > i know that i can link excel tables to an access database. can i link an > access table to a spreadsheet? You may use Data/Get External Data, but this not the same as linked table. Depending on your needs, you may consider using a VBA procedure (macro) to read the data with a DAO.Recordset and copy it manually into to your cells - you can copy also a complete recordset, see CopyFromRecordset in Excel. mfG --> stefan <-- thanks stefa...

Excel 2003
Whenever a colleague updates a spreadsheet I've created it comes back 10MBytes large whereas it was originally only 50KBytes. It looks to me as if the colleague accidentally adds tens or hundreds of thousands of empty rows. How can I delete all rows below a certain row. Delete does not work. Copying the real rows into a new worksheet loses the formatting. When I apply the formatting from the big spreadsheet (paste formatting) I end up with hundreds of thousands of rows again :-( Any suggestions? Tom Selecting all the rows below your actual data. Right-click, delete cells. (this is...

Creating the occurrence frequency chart in Excel
I had a need to put a series of numbers into buckets of size 5. I created the following formula, and "dragged it down" =A1 + IF(MOD(A1,5), 5-MOD(A1,5), 0) I am sure that there is a better way of doing this. Can someone suggest it? Also, I wanted to come up with an occurrence frequency chart for my data. For example if I have numbers 4, 9, 13, 13, 17, 19, 19, 19, then I would like the occurrence frequency chart to plot the following informatiuon in a 2D chart: 0-4: 1 5-9: 2 10-14:2 15-30: 3 Thanks, Song Hi: This will work out the buckets for you. Paste it into the first cel...

Conditional Opening of Excel file
Hi, I have a complex workbook that relies on various SUMIF's from othe reference workbooks. If these aren't open, then obviously the formula don't work. As it's for someone else; I want a piece of VB so that when they *open the main workbook, it checks to see if the ref file is open, and i not, it automatically opens it for them. A bit like this sub worksheetopen '(Not sure where this should go in parent book) if workbook("Referencefile.xls") is NOT open then workbook("referencefile.xls").open endif endsub Any ideas folks?:confused -- Message p...

Suppressing zeros after the decimal point
How can I force zeros to display following a decimal point in Excel 2002? Whenever I type a number, such as 3.200, Excel drops the zeros and only enters 3.2 into the cell. Is there a setting that can be changed to fix this? (Using the "0.00" custom format seems to help, but if I have another number, such as 4.70, which only needs one zero to display, then I need another custom format for that one, and the next one, etc.) If anyone has a simpler suggestion, I'd appreciate it. Thanks! Hi AFAIK you can't achieve this with a custom format. Either you have three decimals or...

how many characters i can put into one cell in Excel
If i typed a whole paragraph into one cell of Excel, only a part of para show up in that cell. I tried wrap text, increase the height of the column. Nothing happen. Any one have idea about it or there are some limit to view in Excel in one cell Hi Search for 'specifications' in Help: It says '32,767 characters. Only 1,024 display in a cell; all 32,767 display in the formula bar.' -- Andy. "Gary" <Gary@discussions.microsoft.com> wrote in message news:747E6CFE-88D9-4F4C-950E-56F0885C3096@microsoft.com... > If i typed a whole paragraph into one cell o...

How do I assign a shortcut key to an existing macro in Excel 2003.
ntahall, Alt+F8 to bring up the choose macro box, select your macro, options, assign a shortcut from there -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2000 & 2003 ** remove news from my email address to reply by email ** "ntahall" <ntahall@discussions.microsoft.com> wrote in message news:21B6102C-4B88-4131-A9AC-C48879896A17@microsoft.com... > ...

excel charts look drastically different on different computers
When we open excel charts on different computers in our office the formatting looks drastically different (for example, data labels and arrows on charts are in different locations). This is a huge problem because it means that the formatting has to be fixed each time someone opens an excel chart. This was never a problem until recently when some of our staff got new computers and for a short time they were using Office 2007 (everyone else in the office was using Office 2003). We've switched everyone back to Office 2003, but the problem with excel charts persists. When u ad...

Can an Excel file be converted into Visio?
Does anyone know if this is even possible? Is there a converter pack or a website that would illustrate this process? Thanks, Jim ...

How to ignore negative numbers
Hi I have a column of values generated in excel some of which are positive, some of which are negative. Now these figures can change regularly from positive to negative depending on previous figures entered so what I wanted to create was a cell that only adds up the positive numbers in the column but ignores any negative numbers. Can anyone help?? Thanks -- frustrated ------------------------------------------------------------------------ frustrated's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=27778 View this thread: http://www.excelforum.com/showthread...

Formatting General to Number
I'm trying to replace text with number values via Find and Replace but when I try to sum the number values, nothing adds up. I've tried to format the cells to Number from General, but Excel doesn't seem to want to do it. All the numbers I've put in using Find and Replace just stay in General format. If I manually type the number in, they sum up fine. But I've got way too much text to do it all by hand. Any ideas? Thanks! Put 1 in a vacant cell, , copy the 1 and then select your text values, go to edit - paste special and multiply. This will covert all to numbe...

Convert Number To Indian Rupees
Dear Friends, Can anyone clearly suggest me how to convert the Number to Text . I need to convert the Number to Indian Ruppes . Eg :1. i need to convert : 1,57,50,178.10 as Rupees One Crore Fifty Seven Lacs Fifty Thousand One Seventy Eight and Ten Paisa Or One Crore Fifty Seven Lacs Fifty Thousand One Seventy Eight Rupees and Ten Paisa Eg 2.: 1,57,50,178.00 as Rupees One Crore Fifty Seven Lacs Fifty Thousand One Seventy Eight . OR One Crore Fifty Seven Lacs Fifty Thousand One Seventy Eight Rupees and Ten Paisa Pls Give me the programme that i can copy and paste to V.B.Module And run i...

excel 2000 convert to excel 2003
Hi I would like to move current excell 2000 spread sheets and open them in 2003 excel. Please help in any way. I have copied my excell 2000 data onto a floppy however it will not open in Excel 2003 XL2000 and XL2003 share exactly the same file format and so should open just fine in either. However, you should never open XL files on floppies - XL uses temporary files, which may exceed the capacity of the floppy. Instead, copy the file from the floppy to your HD before opening. In article <72864281-728A-4B27-8317-A760E6440BB2@microsoft.com>, cityof <cityof@discussions.microsoft...

Font size changes in Excel 2003 charts when re-opened
For certain charts that I create within Excel 2003 (usually bar charts), I use a font size of 8 (eg for data labels, axis labels, and scale). If I close the file and then re-open it, all these fonts will have become size one (title and legend are not effected). Oddly, if I have created a bar chart and made several copies of it within a worksheet, it will only be the original and not the copies that are affected by this. If anyone can shed any light on why this may be happening and how it could be fixed, I would really appreciate it. Lucie ...

Using VBA to change Excel layouts
Our company has designed 4 different spreadsheet designs. The same data gets stored in any of the 4 spreadsheet layouts....the only difference is that some spreadsheets use different colors, have different fonts and cell sizes and etc... I thought it would be nice to create just ONE spreadsheet that contains a combo-box or list-box or drop-down box which allows the user to select 1 of the 4 layout choices, then I want VBA to programattically setup the spreadsheet layout according to the users choice. Does that make sense? Does anybody know any good ways to implement something lik...

Importing of Gift Card numbers and balances
I have a customer that has a list of Gift Card numbers and balances from their old POS system. Is there a way to import those balances and numbers as vouchers? Or is there an alternate way to use these existing Gift Cards? Thanks in advance. Phil ...

USING DATES IN FORMULAS #2
I foubd a problem with excel 2003 If you introduce a formula using dates (in spanish version) (dd/mm/yy), excel doesnt makes the calculation........... ???? Can somebody hep me In the USA version (English), I could use: =if(a1=date(2005,10,27),"It's Oct 27, 2005","it's not") to refer to a date. I don't know what the Spanish function is for =date(), though. Carlos Benavides wrote: > > I foubd a problem with excel 2003 > If you introduce a formula using dates (in spanish version) (dd/mm/yy), > excel doesnt makes the calculation........... ????...