ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formating into date and time (https://www.excelbanter.com/excel-discussion-misc-queries/153587-formating-into-date-time.html)

Daniel

Formating into date and time
 
Hello,

I am building a text using multiple cell values. Here is an extract

= 'Contract variables'!B12 & " on " & 'Contract variables'!B11 & " at the
inspection site"

problem being that it return/displays

'0.375 on 39294 at the inspection site'

instead of

'9:00 on 2007/07/29 at the inspection site'

How can I convert the date and time values into proper values?

Thank you,

Daniel P

Earl Kiosterud

Formating into date and time
 
Daniel,

You can formate it in the formula:

= TEXT('Contract variables'!B12, "mm/dd/yy") & " on " & text('Contract
variables'!B11,"hh:mm:ss") & " at the inspection site"
--
Earl Kiosterud
www.smokeylake.com

Note: Top-posting has been the norm here.
Some folks prefer bottom-posting.
But if you bottom-post to a reply that's
already top-posted, the thread gets messy.
When in Rome...
-----------------------------------------------------------------------
"Daniel" wrote in message
...
Hello,

I am building a text using multiple cell values. Here is an extract

= 'Contract variables'!B12 & " on " & 'Contract variables'!B11 & " at the
inspection site"

problem being that it return/displays

'0.375 on 39294 at the inspection site'

instead of

'9:00 on 2007/07/29 at the inspection site'

How can I convert the date and time values into proper values?

Thank you,

Daniel P




Daniel

Formating into date and time
 
I've never used the text() function before. Thank you for making me aware of
it!

Daniel P




"Earl Kiosterud" wrote:

Daniel,

You can formate it in the formula:

= TEXT('Contract variables'!B12, "mm/dd/yy") & " on " & text('Contract
variables'!B11,"hh:mm:ss") & " at the inspection site"
--
Earl Kiosterud
www.smokeylake.com

Note: Top-posting has been the norm here.
Some folks prefer bottom-posting.
But if you bottom-post to a reply that's
already top-posted, the thread gets messy.
When in Rome...
-----------------------------------------------------------------------
"Daniel" wrote in message
...
Hello,

I am building a text using multiple cell values. Here is an extract

= 'Contract variables'!B12 & " on " & 'Contract variables'!B11 & " at the
inspection site"

problem being that it return/displays

'0.375 on 39294 at the inspection site'

instead of

'9:00 on 2007/07/29 at the inspection site'

How can I convert the date and time values into proper values?

Thank you,

Daniel P






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

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