|
-
Mar 21st, 2000, 05:22 AM
#1
Thread Starter
New Member
Hello,
I have an excel spreadsheet with date and time in the same cell. My question is how do I separate thos data and put them into two different cells ?
The data looks like this:
1999-06-30 18:26:31
Then, I have to erase informations concerning seconds.
Any suggestion ?
-
Mar 21st, 2000, 06:17 AM
#2
New Member
Hello,
The function of date: is the date itself say 1999-06-30 and the time 18:26:31
I don't know about separating them but copy and pasting them
into an adjacent cell and then format one cell for time and one cell for date.... Just pick the correct category and type...
I don't know if it will help or not?!?!?
-
Mar 21st, 2000, 10:33 AM
#3
Lively Member
use NumberFormatLocal...
for example...
Code:
' A1 contains the date plus the time
' A2 will contain the date
' A3 will contain the time
Range("A2").Value = Range("A1").Value
Range("A2").NumberFormatLocal = "yyyy/mm/dd"
Range("A3").Value = Range("A1").Value
Range("A3").NumberFormatLocal = "hh:mm"
' This is applicable in VBA- Excel
-
Mar 21st, 2000, 11:18 AM
#4
Addicted Member
Hi.
Try these short cuts. They make live much easier 
To enter the current date into the active cell, press [Ctrl][;]
To enter the current time, press [Ctrl][Shift][;]
If you want to use them from VB, Use SendKey .
Good Luck.
Lyla
[Edited by Lyla on 03-21-2000 at 11:22 PM]
-
Mar 21st, 2000, 03:30 PM
#5
Thread Starter
New Member
Ok, thank you all for the answers...
Nankien
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|