#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Date format troubles

I have an Excel worksheet that has dates entered as General format like the
following: 19970103

I am trying to convert these to dates (MM/DD/YYYY), but everything I try
does not work.

Any help is greatly appreciated!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default Date format troubles

Hi
in one column enter the formula as follow
=DATE(VALUE(LEFT(A1,4)),VALUE(MID(A1,1,1)),VALUE(R IGHT(A1,1)))

"jjackson97" wrote:

I have an Excel worksheet that has dates entered as General format like the
following: 19970103

I am trying to convert these to dates (MM/DD/YYYY), but everything I try
does not work.

Any help is greatly appreciated!

  #3   Report Post  
Posted to microsoft.public.excel.misc
MC MC is offline
external usenet poster
 
Posts: 29
Default Date format troubles

I am assuming 01 is your month, so it would be

=DATE(LEFT(A1,4),LEFT(RIGHT(A1,4),2),RIGHT(A1,2))

if 01 is your day, then

=DATE(LEFT(A1,4),RIGHT(A1,2),LEFT(RIGHT(A1,4),2))

Then format the date to what you want.

"jjackson97" wrote:

I have an Excel worksheet that has dates entered as General format like the
following: 19970103

I am trying to convert these to dates (MM/DD/YYYY), but everything I try
does not work.

Any help is greatly appreciated!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Date format troubles

Very close. I left off that some of the data was not with leading 0's for
the date an month. So there was stuff like 19951112, which got messy with
your formula. However you got me in the right direction to tweak it to:
=DATE(VALUE(LEFT(A2,4)),VALUE(MID(A2,5,2)),VALUE(R IGHT(A2,2)))

For that I am grateful! THANKS!

"Eduardo" wrote:

Hi
in one column enter the formula as follow
=DATE(VALUE(LEFT(A1,4)),VALUE(MID(A1,1,1)),VALUE(R IGHT(A1,1)))

"jjackson97" wrote:

I have an Excel worksheet that has dates entered as General format like the
following: 19970103

I am trying to convert these to dates (MM/DD/YYYY), but everything I try
does not work.

Any help is greatly appreciated!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default Date format troubles

your welcome, have a great weekend

"jjackson97" wrote:

Very close. I left off that some of the data was not with leading 0's for
the date an month. So there was stuff like 19951112, which got messy with
your formula. However you got me in the right direction to tweak it to:
=DATE(VALUE(LEFT(A2,4)),VALUE(MID(A2,5,2)),VALUE(R IGHT(A2,2)))

For that I am grateful! THANKS!

"Eduardo" wrote:

Hi
in one column enter the formula as follow
=DATE(VALUE(LEFT(A1,4)),VALUE(MID(A1,1,1)),VALUE(R IGHT(A1,1)))

"jjackson97" wrote:

I have an Excel worksheet that has dates entered as General format like the
following: 19970103

I am trying to convert these to dates (MM/DD/YYYY), but everything I try
does not work.

Any help is greatly appreciated!



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default Date format troubles

A shorter method with less function calls...

=--TEXT(A2,"0000-00-00")

You can format the cell in the date format you want.

--
Rick (MVP - Excel)


"jjackson97" wrote in message
...
Very close. I left off that some of the data was not with leading 0's for
the date an month. So there was stuff like 19951112, which got messy with
your formula. However you got me in the right direction to tweak it to:
=DATE(VALUE(LEFT(A2,4)),VALUE(MID(A2,5,2)),VALUE(R IGHT(A2,2)))

For that I am grateful! THANKS!

"Eduardo" wrote:

Hi
in one column enter the formula as follow
=DATE(VALUE(LEFT(A1,4)),VALUE(MID(A1,1,1)),VALUE(R IGHT(A1,1)))

"jjackson97" wrote:

I have an Excel worksheet that has dates entered as General format like
the
following: 19970103

I am trying to convert these to dates (MM/DD/YYYY), but everything I
try
does not work.

Any help is greatly appreciated!


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
Convert european foreign date format to US date format EAL Excel Worksheet Functions 1 May 14th 09 10:02 PM
format troubles - possible cut/paste issue sorrywm Excel Discussion (Misc queries) 8 March 22nd 09 07:40 PM
Convert date + time text format to date format Paul Ho Excel Worksheet Functions 2 May 22nd 07 05:47 PM
date sorting troubles Nevin Setting up and Configuration of Excel 5 June 14th 06 10:13 PM
Excel 2000 date format cannot be set to Australian date format Brian Jones Excel Discussion (Misc queries) 1 March 30th 05 06:03 AM


All times are GMT +1. The time now is 08:39 PM.

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"