ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Removing date from time (https://www.excelbanter.com/excel-discussion-misc-queries/165759-removing-date-time.html)

Ugnz

Removing date from time
 
I am importing data from a CSV which gives me a time with the appropriate
date. i.e. 8/11/07 11:51. I am only interested in the time portion of that,
as I'm adding my own data. When you type in a time, it automatically assumes
you mean 0/1/00.

How do I change the imported data to be the same date as my typed data,
given that the imported data will have several different dates?

Thanks

Maria :)

Gary''s Student

Removing date from time
 
If the import date/time is in A1 and the desired date is in A2, then in A3:
=A2+MOD(A1,1)


For example:

11/12/2007 18:52
7/7/2007
7/7/2007 18:52

--
Gary''s Student - gsnu200755


"Ugnz" wrote:

I am importing data from a CSV which gives me a time with the appropriate
date. i.e. 8/11/07 11:51. I am only interested in the time portion of that,
as I'm adding my own data. When you type in a time, it automatically assumes
you mean 0/1/00.

How do I change the imported data to be the same date as my typed data,
given that the imported data will have several different dates?

Thanks

Maria :)


Fred Smith

Removing date from time
 
=mod(a1,0)

will give you just the time. Adjust the range to suit.

--
Regards,
Fred


"Ugnz" wrote in message
...
I am importing data from a CSV which gives me a time with the appropriate
date. i.e. 8/11/07 11:51. I am only interested in the time portion of that,
as I'm adding my own data. When you type in a time, it automatically assumes
you mean 0/1/00.

How do I change the imported data to be the same date as my typed data,
given that the imported data will have several different dates?

Thanks

Maria :)




Pete_UK

Removing date from time
 
If your date/time is in A1, then put this in B1:

=A1-INT(A1)

Format as Time and copy down as required.

Hope this helps.

Pete

On Nov 12, 11:51 pm, Ugnz wrote:
I am importing data from a CSV which gives me a time with the appropriate
date. i.e. 8/11/07 11:51. I am only interested in the time portion of that,
as I'm adding my own data. When you type in a time, it automatically assumes
you mean 0/1/00.

How do I change the imported data to be the same date as my typed data,
given that the imported data will have several different dates?

Thanks

Maria :)




David Biddulph[_2_]

Removing date from time
 
I hope you meant =mod(a1,1), Fred?
Dividing by zero isn't to be encouraged. :-)
--
David Biddulph

"Fred Smith" wrote in message
...
=mod(a1,0)

will give you just the time. Adjust the range to suit.


"Ugnz" wrote in message
...
I am importing data from a CSV which gives me a time with the appropriate
date. i.e. 8/11/07 11:51. I am only interested in the time portion of
that,
as I'm adding my own data. When you type in a time, it automatically
assumes
you mean 0/1/00.

How do I change the imported data to be the same date as my typed data,
given that the imported data will have several different dates?

Thanks

Maria :)




Fred Smith

Removing date from time
 
You're correct, of course, Dave. I normally cut and paste formulae to avoid this
problem, but I said, this one's so short, I'll just type it in. Obviously it
wasn't the time saver I hoped it would be.

--
Regards,
Fred


"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
I hope you meant =mod(a1,1), Fred?
Dividing by zero isn't to be encouraged. :-)
--
David Biddulph

"Fred Smith" wrote in message
...
=mod(a1,0)

will give you just the time. Adjust the range to suit.


"Ugnz" wrote in message
...
I am importing data from a CSV which gives me a time with the appropriate
date. i.e. 8/11/07 11:51. I am only interested in the time portion of
that,
as I'm adding my own data. When you type in a time, it automatically
assumes
you mean 0/1/00.

How do I change the imported data to be the same date as my typed data,
given that the imported data will have several different dates?

Thanks

Maria :)







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

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