PC Review


Reply
Thread Tools Rate Thread

changing date formatted as general number into date format

 
 
=?Utf-8?B?cGdoaW8=?=
Guest
Posts: n/a
 
      2nd Mar 2007
Hi -
I have a rather large dataset that arrived with all the dates formatted as
general numbers which I can't seem to convert to a date format that is
recognized by either excel or access 07 - I've tried converting to regular
number then to text as well as converting to text and then to date but I
can't seem to make it work. The dates are also represented in yyyymmdd
format - ie, 20070105 which doesn't line up with the typical american date
format. Any suggestions? Any help would be appreciated. Thanks
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sm9lbA==?=
Guest
Posts: n/a
 
      2nd Mar 2007
the numbers are proably in straight number format and not date format. On a
new woksheet copy this formul into cell A1. change sheet1 to the correct
worksheet name. then copy this formula to the entire worksheet. see if you
get the correct dates. the fomula changes a general number 20071201 to a
microsoft date number.

=DATE(LEFT(TEXT(sheet1!A1,"general"),4),MID(TEXT(sheet1!A1,"general"),4,2),MID(TEXT(sheet1!A1,"general"),7,2))

"pghio" wrote:

> Hi -
> I have a rather large dataset that arrived with all the dates formatted as
> general numbers which I can't seem to convert to a date format that is
> recognized by either excel or access 07 - I've tried converting to regular
> number then to text as well as converting to text and then to date but I
> can't seem to make it work. The dates are also represented in yyyymmdd
> format - ie, 20070105 which doesn't line up with the typical american date
> format. Any suggestions? Any help would be appreciated. Thanks

 
Reply With Quote
 
=?Utf-8?B?cGdoaW8=?=
Guest
Posts: n/a
 
      2nd Mar 2007
Ok - will try this and let you know. Thanks!!

"Joel" wrote:

> the numbers are proably in straight number format and not date format. On a
> new woksheet copy this formul into cell A1. change sheet1 to the correct
> worksheet name. then copy this formula to the entire worksheet. see if you
> get the correct dates. the fomula changes a general number 20071201 to a
> microsoft date number.
>
> =DATE(LEFT(TEXT(sheet1!A1,"general"),4),MID(TEXT(sheet1!A1,"general"),4,2),MID(TEXT(sheet1!A1,"general"),7,2))
>
> "pghio" wrote:
>
> > Hi -
> > I have a rather large dataset that arrived with all the dates formatted as
> > general numbers which I can't seem to convert to a date format that is
> > recognized by either excel or access 07 - I've tried converting to regular
> > number then to text as well as converting to text and then to date but I
> > can't seem to make it work. The dates are also represented in yyyymmdd
> > format - ie, 20070105 which doesn't line up with the typical american date
> > format. Any suggestions? Any help would be appreciated. Thanks

 
Reply With Quote
 
=?Utf-8?B?cGdoaW8=?=
Guest
Posts: n/a
 
      2nd Mar 2007
Well - I'm getting a date - but they are all the same 1/0/1900 -

"Joel" wrote:

> the numbers are proably in straight number format and not date format. On a
> new woksheet copy this formul into cell A1. change sheet1 to the correct
> worksheet name. then copy this formula to the entire worksheet. see if you
> get the correct dates. the fomula changes a general number 20071201 to a
> microsoft date number.
>
> =DATE(LEFT(TEXT(sheet1!A1,"general"),4),MID(TEXT(sheet1!A1,"general"),4,2),MID(TEXT(sheet1!A1,"general"),7,2))
>
> "pghio" wrote:
>
> > Hi -
> > I have a rather large dataset that arrived with all the dates formatted as
> > general numbers which I can't seem to convert to a date format that is
> > recognized by either excel or access 07 - I've tried converting to regular
> > number then to text as well as converting to text and then to date but I
> > can't seem to make it work. The dates are also represented in yyyymmdd
> > format - ie, 20070105 which doesn't line up with the typical american date
> > format. Any suggestions? Any help would be appreciated. Thanks

 
Reply With Quote
 
=?Utf-8?B?cGdoaW8=?=
Guest
Posts: n/a
 
      2nd Mar 2007
JOEL - thanks for your help - I got it to work - tweeked the formula - a tad
but couldn't have done it without your help! Thanks so much!!!!
=DATE(LEFT(TEXT(A2,"general"),4),MID(TEXT(A2,"general"),5,2),MID(TEXT(A2,"general"),7,2))
where the original date in in A2 - changed 4,2 to 5,2

"pghio" wrote:

> Well - I'm getting a date - but they are all the same 1/0/1900 -
>
> "Joel" wrote:
>
> > the numbers are proably in straight number format and not date format. On a
> > new woksheet copy this formul into cell A1. change sheet1 to the correct
> > worksheet name. then copy this formula to the entire worksheet. see if you
> > get the correct dates. the fomula changes a general number 20071201 to a
> > microsoft date number.
> >
> > =DATE(LEFT(TEXT(sheet1!A1,"general"),4),MID(TEXT(sheet1!A1,"general"),4,2),MID(TEXT(sheet1!A1,"general"),7,2))
> >
> > "pghio" wrote:
> >
> > > Hi -
> > > I have a rather large dataset that arrived with all the dates formatted as
> > > general numbers which I can't seem to convert to a date format that is
> > > recognized by either excel or access 07 - I've tried converting to regular
> > > number then to text as well as converting to text and then to date but I
> > > can't seem to make it work. The dates are also represented in yyyymmdd
> > > format - ie, 20070105 which doesn't line up with the typical american date
> > > format. Any suggestions? Any help would be appreciated. Thanks

 
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
column formatted to general - cells keep changing to date? lilsparkdog Microsoft Excel New Users 1 11th Sep 2008 05:48 PM
Format General date format into short date when exporting Ruthie Microsoft Access 1 2nd May 2008 07:58 PM
converting general date format data into short date format savigliano Microsoft Access Form Coding 3 27th Nov 2006 04:37 AM
Changing date in number format to dd/mm/yyyy? =?Utf-8?B?YXJnZWFy?= Microsoft Access 5 4th Feb 2006 10:37 PM
Querying for Date() in Field Formatted General Date/Time =?Utf-8?B?QW5pdGEgVGF5bG9y?= Microsoft Access Queries 2 12th Jul 2005 03:19 PM


Features
 

Advertising
 

Newsgroups
 


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