date and time formatting

R

rantz

A2=2004-09-01 (formatted as date)
B2=00:08:25 (formatted as time)

I want C2 to look like '2004-09-01, 00:08:25'. It's formatted like
'YYYY-MM-DD, tt:mm:ss'

To get the info I use '=EXTEXT(A2;1;10)&", "&EXTEXT(B2;1;8)' but I get
'38231, 00:08:18'

How do I get it to work?
 
B

Bob Phillips

Don't have Swedish Excel, but I would just use TEXT. Try this

=TEXT(A2+B2;"yyyy-mm-dd hh:mm:ss")

but if that doesn't work, then try

=TEXT(A2;"yyyy-mm-dd")&TEXT(B2,"hh:mm:ss")

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
R

rantz

I think this is really strange. I don't get the correct info? This is
what I get. How on earth do I get 2004-08-01 from 2004-09-01?

A2=2004-09-01
B2=00:08:18

(yyyy=åååå, hh=tt)
2004-08-01, 00:08:18 '=TEXT(A2+B2;"åååå-mm-dd, tt:mm:ss")'
2004-00-01, 00:08:18 '=TEXT(A2;"åååå-mm-dd")&", "& TEXT(B2;
"tt:mm:ss")'
00:08:18 '=TEXT(B2; "tt:mm:ss")'
2004-00-01 '=TEXT(A2;"åååå-mm-dd")'

Another thing, is it possible to lock the rows so that they stay intact
regardless of sorting. I keep messing them up.
 
B

Bob Phillips

That is strange, and one for which I have no answer I am afraid.

--

HTH

RP
(remove nothere from the email address if mailing direct)


I think this is really strange. I don't get the correct info? This is
what I get. How on earth do I get 2004-08-01 from 2004-09-01?

A2=2004-09-01
B2=00:08:18

(yyyy=åååå, hh=tt)
2004-08-01, 00:08:18 '=TEXT(A2+B2;"åååå-mm-dd, tt:mm:ss")'
2004-00-01, 00:08:18 '=TEXT(A2;"åååå-mm-dd")&", "& TEXT(B2;
"tt:mm:ss")'
00:08:18 '=TEXT(B2; "tt:mm:ss")'
2004-00-01 '=TEXT(A2;"åååå-mm-dd")'

Another thing, is it possible to lock the rows so that they stay intact
regardless of sorting. I keep messing them up.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top