I'm trying to convert date and time to text but when I use this formula
=concatenate(text(A2,"yyyy-mm-dd")&" "&text(B2,"hh:mm:ss"))
the result is "true" and "false"
I tried to look my old file, and the result should look like this
CodePudding user response:
Why are you even doing this?
In Excel, dates are stored as integers, while times are stored as decimals. As both are numbers, you can get a datetime (date AND time) by simply adding both values.
So, this formula should give you what you need:
=TEXT(A2 B2,"yyyy-mm-dd hh:mm:ss")
Result: