ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Converting Text to Dates (https://www.excelbanter.com/excel-worksheet-functions/192538-converting-text-dates.html)

OxonLad

Converting Text to Dates
 
Some of our company systems output dates in the format yyyymmdd but in a
"general" format eg 20080625 for the 25th June 2008. How can I convert this
to a date so I can use the day(), month(), year() functions?

At the moment I am using left(), mid(), right() to break up the text string
but there must be an easier way

Thank You

Gary''s Student

Converting Text to Dates
 
=DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2)) and format the cell as Date
--
Gary''s Student - gsnu200793


"OxonLad" wrote:

Some of our company systems output dates in the format yyyymmdd but in a
"general" format eg 20080625 for the 25th June 2008. How can I convert this
to a date so I can use the day(), month(), year() functions?

At the moment I am using left(), mid(), right() to break up the text string
but there must be an easier way

Thank You


Teethless mama

Converting Text to Dates
 
Data Text to Columns Next Next Select Date: YMD Finish out


"OxonLad" wrote:

Some of our company systems output dates in the format yyyymmdd but in a
"general" format eg 20080625 for the 25th June 2008. How can I convert this
to a date so I can use the day(), month(), year() functions?

At the moment I am using left(), mid(), right() to break up the text string
but there must be an easier way

Thank You


David Biddulph[_2_]

Converting Text to Dates
 
Data/ Text to Colums/ Delimited/ Next/ Next/ Date : YMD
--
David Biddulph

"OxonLad" wrote in message
...
Some of our company systems output dates in the format yyyymmdd but in a
"general" format eg 20080625 for the 25th June 2008. How can I convert
this
to a date so I can use the day(), month(), year() functions?

At the moment I am using left(), mid(), right() to break up the text
string
but there must be an easier way

Thank You




Rick Rothstein \(MVP - VB\)[_760_]

Converting Text to Dates
 
Here is another way to do it via a formula...

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

Rick


"Gary''s Student" wrote in message
...
=DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2)) and format the cell as Date
--
Gary''s Student - gsnu200793


"OxonLad" wrote:

Some of our company systems output dates in the format yyyymmdd but in a
"general" format eg 20080625 for the 25th June 2008. How can I convert
this
to a date so I can use the day(), month(), year() functions?

At the moment I am using left(), mid(), right() to break up the text
string
but there must be an easier way

Thank You




All times are GMT +1. The time now is 10:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com