ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how to convert date type to text type (https://www.excelbanter.com/excel-discussion-misc-queries/150478-how-convert-date-type-text-type.html)

Steffen

how to convert date type to text type
 
i want to convert a cell a1 2007-7-8 to a text type, but i did not know how
to set the second parameter of text function.
text(a1,??).


Ron Rosenfeld

how to convert date type to text type
 
On Mon, 16 Jul 2007 19:32:02 -0700, Steffen
wrote:

i want to convert a cell a1 2007-7-8 to a text type, but i did not know how
to set the second parameter of text function.
text(a1,??).


?? is any of the date format codes that you want to use.

For example:

=text(a1,"yyyy-m-d")


--ron

Steffen

how to convert date type to text type
 
ok,if i just want use y m d data,how to set ?

"Ron Rosenfeld" wrote:

On Mon, 16 Jul 2007 19:32:02 -0700, Steffen
wrote:

i want to convert a cell a1 2007-7-8 to a text type, but i did not know how
to set the second parameter of text function.
text(a1,??).


?? is any of the date format codes that you want to use.

For example:

=text(a1,"yyyy-m-d")


--ron


Ron Rosenfeld

how to convert date type to text type
 
On Mon, 16 Jul 2007 19:52:05 -0700, Steffen
wrote:

ok,if i just want use y m d data,how to set ?


I don't understand your question.

What is "y m d data"?

How do you want to "use" it?

In the formula I gave you, A1 must contain a date (which, in Excel,is a serial
number).
--ron


All times are GMT +1. The time now is 05:40 AM.

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