How to convert dates

lcohenvb

New Member
Joined
Oct 27, 2002
Messages
44
When I do a query from the database, the date comes back as a text value yyyymmdd. What is the best way to convert it to a date value so that I can use it in a formula. Obviously just changing the format to date does not work. I have also separated the date into three columns with column 1 being yyyy, column 2 as mm and column 3 as dd but when I try to concatenate it I still cannot get it into a date format. Any help is appreciated. Thanks!
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
highlight the column, go to data | text to columns, click next twice, then select 'Date' as the column data format & select YMD from the drop-down. ckick finish

paddy
 
Upvote 0
Paddy, it worked like a charm. I swear I tried that before and it didn't! Thanks so much, I've been working on this for an hour!

LC
 
Upvote 0

Forum statistics

Threads
1,214,942
Messages
6,122,366
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top