PC Review


Reply
Thread Tools Rate Thread

Converting Text to Dates

 
 
OxonLad
Guest
Posts: n/a
 
      25th Jun 2008
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
 
Reply With Quote
 
 
 
 
Gary''s Student
Guest
Posts: n/a
 
      25th Jun 2008
=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

 
Reply With Quote
 
Teethless mama
Guest
Posts: n/a
 
      25th Jun 2008
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

 
Reply With Quote
 
David Biddulph
Guest
Posts: n/a
 
      25th Jun 2008
Data/ Text to Colums/ Delimited/ Next/ Next/ Date : YMD
--
David Biddulph

"OxonLad" <(E-Mail Removed)> wrote in message
news1FB2161-804C-46A5-97C2-(E-Mail Removed)...
> 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



 
Reply With Quote
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      25th Jun 2008
Here is another way to do it via a formula...

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

Rick


"Gary''s Student" <(E-Mail Removed)> wrote in message
news:92DC4F47-178D-45C5-A3CB-(E-Mail Removed)...
> =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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting Text dates into dates EAB1977 Microsoft Excel Programming 2 20th Jan 2006 04:20 PM
Converting text to dates =?Utf-8?B?SmFjaw==?= Microsoft Excel Misc 2 25th Apr 2005 07:36 PM
ACCESS Help Converting text to Dates bob Microsoft Access External Data 1 12th Aug 2003 10:45 PM
Re: Converting Dates to Text ???? John Spencer (MVP) Microsoft Access Queries 0 15th Jul 2003 01:07 PM
Re: Converting Dates to Text ???? Tom Ellison Microsoft Access Queries 0 15th Jul 2003 03:32 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:42 AM.