Date format in fraction

1

I have the following value 14/02/2018 13:53:12 in excel.

Cell with the value is in text format.

When you concatenate the value the date above looks like this: 43145,57861111111

Does anyone know how to solve it?

The function I am using is like this: =CONCATENAR("Codigo: ";A1;" - Data: ";B1)

    
asked by anonymous 15.02.2018 / 20:27

2 answers

4

You must convert to text using the TEXT function, see below:

=CONCATENAR("Codigo: ";A1;" - Data: ";TEXTO(B1;"dd/MM/aaaa HH:mm"))
    
15.02.2018 / 20:44
2

With the data:

+---+---------+-------------+
|   |    A    |      B      |
+---+---------+-------------+
| 1 | 9630638 | 43145,57861 |
+---+---------+-------------+

With the concatenation formula =CONCATENAR("Codigo: ";A1;" - Data: ";B1) the result is Codigo: 9630638 - Data: 43145,5786111111

This is because Excel is using the cell data B1 as number, so just convert it to the date format to get the date: =TEXTO(B1;"dd/mm/aaaa hh:mm:ss")

Then you can concatenate with this formula: =CONCATENAR("Codigo: ";A1;" - Data: ";TEXTO(B1;"dd/mm/aaaa hh:mm:ss"))

And the result is: Codigo: 9630638 - Data: 14/02/2018 13:53:12

    
15.02.2018 / 20:48