I've copied data into Excel from a SQL database. The way the data is formatted before it gets copied over is: YYYY-MM-DD
After it gets copied over, it shows in excel as M/DD/YYYY
.
I right-clicked the column and selected Format Cells to a custom format just as I needed.
The problem is that if I select the value, although the spreadsheet shows the value I need, the actual value itself is different (I'll include a screenshot to show what I'm seeing):
My end goal is to select an empty cell and do a simple formula which is:
=" DateValue="&B1&" "
But it outputs something completely different. Example: If my date was 2016-09-23
or just as it shows above in the image, when applying the formula above, I get:
DateValue=42636
When what I need is :
DateValue=2016-09-23
Can anyone advise how to achieve this end goal?
You can nest TEXT
function within CONCAT
function. Text function returns the text in the desired format, and concat function concatenates strings. Following formula will convert the date in cell A1 to the desired output:
=CONCAT("DateValue=", TEXT(A1, "yyyy-mm-dd"))
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.