Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am trying to figure out how to convert a date into a string in a google sheet.

I have one date field that has varying formats. I want create another column that's literally just the same but as a text. For example, if I had the following data

date       date_as_string
12-05-2016 '12-05-2016
12/5/2016  '12/5/2016
2016-12-10 '2016-12-10

Where the ' is just to denote that it is a string note a date.

question from:https://stackoverflow.com/questions/40857180/how-to-convert-a-date-to-a-string-in-google-sheet

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
142 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can use the TEXT function.

=Text(cellReference, "mm-dd-yyyy")

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...