ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formatting Date (https://www.excelbanter.com/excel-discussion-misc-queries/203459-formatting-date.html)

Question Boy

Formatting Date
 
I have a column which contains dates

2008-Jan-10

I have tried changing the cell format, but it has no effect. I have tried
using the Text(..,"yyyy-m-d"), but it has not effect. How can I change the
format so it is formatted like yyyy-m-d?

Thank you

QB

Fred Smith[_4_]

Formatting Date
 
You have a column which contains text, not dates. You need to change them to
dates in order to format them. The easiest way is with Text-to-Columns

Regards,
Fred.

"Question Boy" wrote in message
...
I have a column which contains dates

2008-Jan-10

I have tried changing the cell format, but it has no effect. I have tried
using the Text(..,"yyyy-m-d"), but it has not effect. How can I change
the
format so it is formatted like yyyy-m-d?

Thank you

QB



Dave Peterson

Formatting Date
 
Select the column
Data|Text to columns
Fixed width (remove any lines that excel guessed)
Choose Date (ymd) on the third step)

Format the way you like.

Excel doesn't see your text "2008-Jan-10" as a date. That's why changing the
number format didn't change the displayed text.

Question Boy wrote:

I have a column which contains dates

2008-Jan-10

I have tried changing the cell format, but it has no effect. I have tried
using the Text(..,"yyyy-m-d"), but it has not effect. How can I change the
format so it is formatted like yyyy-m-d?

Thank you

QB


--

Dave Peterson

Question Boy

Formatting Date
 
Worked like a charm!!! That's a new one for the toolbox (never seen or used
that built-in function before).

Thank you!

QB





"Dave Peterson" wrote:

Select the column
Data|Text to columns
Fixed width (remove any lines that excel guessed)
Choose Date (ymd) on the third step)

Format the way you like.

Excel doesn't see your text "2008-Jan-10" as a date. That's why changing the
number format didn't change the displayed text.

Question Boy wrote:

I have a column which contains dates

2008-Jan-10

I have tried changing the cell format, but it has no effect. I have tried
using the Text(..,"yyyy-m-d"), but it has not effect. How can I change the
format so it is formatted like yyyy-m-d?

Thank you

QB


--

Dave Peterson


Nat

Formatting Date
 
Thank you Dave,

I never knew this was a feature in excel and I have been writing scripts by
hand to process this kind of stuff. Thanks for the great tool.

Nat
"Dave Peterson" wrote:

Select the column
Data|Text to columns
Fixed width (remove any lines that excel guessed)
Choose Date (ymd) on the third step)

Format the way you like.

Excel doesn't see your text "2008-Jan-10" as a date. That's why changing the
number format didn't change the displayed text.

Question Boy wrote:

I have a column which contains dates

2008-Jan-10

I have tried changing the cell format, but it has no effect. I have tried
using the Text(..,"yyyy-m-d"), but it has not effect. How can I change the
format so it is formatted like yyyy-m-d?

Thank you

QB


--

Dave Peterson



All times are GMT +1. The time now is 11:20 PM.

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