brain cramp

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Sorry to bother you with this one but I can't remember how to do this.

I have a column of dates in an Excel table. They are not seperated in any
way. For example today is 10242006. How do I split that and/or just make it a
date format?

Thanks
 
Sorry to bother you with this one but I can't remember how to do this.

I have a column of dates in an Excel table. They are not seperated in any
way. For example today is 10242006. How do I split that and/or just make it a
date format?

Thanks

You have posted this message to the wrong newsgroup.
The access in this groups name refers to Microsoft Access, a database
program.
Please repost to the correct newsgroup for the Excel program version
you are using. I would suggest you include your Windows and Office
version number in the message.
 
I need to use them in Access.

fredg said:
You have posted this message to the wrong newsgroup.
The access in this groups name refers to Microsoft Access, a database
program.
Please repost to the correct newsgroup for the Excel program version
you are using. I would suggest you include your Windows and Office
version number in the message.
 
Joe C said:
Sorry to bother you with this one but I can't remember how to do this.

I have a column of dates in an Excel table. They are not seperated in any
way. For example today is 10242006. How do I split that and/or just make it a
date format?

Thanks

Maybe somthing like

Dim dDate As Variant
Dim strDate As String

strDate = "10242006"

dDate = DateSerial(CInt(Right$(strDate, 4)), _
CInt(Left$(strDate, 2)), CInt(Mid$(strDate, 3, 2)))

(untested)

HTH
Matthias Kläy
 
I need to use them in Access.

All of the values are in mmddyyyy form?
To convert a value of 10242006 to a date, in Access, you can use:
=DateSerial(Right([FieldName],4),Left([FieldName],2),Mid(FieldName],3,2)
 
Sorry to bother you with this one but I can't remember how to do this.

I have a column of dates in an Excel table. They are not seperated in any
way. For example today is 10242006. How do I split that and/or just make it a
date format?

Thanks

As an alternative to Matthias' suggestion, you can try

CDate(Format([datefield], "@@/@@/@@@@"))

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top