| View previous topic :: View next topic |
| Author |
Message |
jgillean General User

Joined: 23 Jul 2004 Posts: 6
|
Posted: Wed Jul 28, 2004 3:02 pm Post subject: Oppositie of concantenate? |
|
|
I have a download from a data server that creates a date and time stamp in the same column. I want to seperate them out so I can acutally do something useful with the information. Any ideas?
It looks like this in one column
2004-07-20 15:00:00
I would like it to look like this:
2004-07-20 | 15:00:00
Thanks |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
Iannz OOo Advocate

Joined: 14 Feb 2004 Posts: 494 Location: Christchurch, New Zealand
|
Posted: Thu Jul 29, 2004 12:32 am Post subject: |
|
|
Alternatively use the formulas left and right as follows assuming A1 holds "2004-07-20 15:00:00 ":
=left(A1;11)
=right(A1;9)
If the date format is such that they have different lengths but are separated by a space:
in B1 =find(" ";A1)
=left(A1;B1)
=right(A1,len(A1)-B1) _________________ Cheers, Ian
http://wiki.services.openoffice.org/wiki/Extensions_development_basic a wiki about writing OpenOffice.org extensions. |
|
| Back to top |
|
 |
r_vinoya Super User


Joined: 03 Dec 2003 Posts: 619 Location: Somewhere in the Philippines
|
Posted: Fri Jul 30, 2004 10:15 pm Post subject: |
|
|
| Iannz wrote: | Alternatively use the formulas left and right as follows assuming A1 holds "2004-07-20 15:00:00 ":
=left(A1;11)
=right(A1;9)
If the date format is such that they have different lengths but are separated by a space:
in B1 =find(" ";A1)
=left(A1;B1)
=right(A1,len(A1)-B1) |
or you can use "=SEARCH()" function instead of "=FIND()" and your equations will be:
At A1 type = 2004-07-20 15:00:00
At B1 type:
| Code: | | =left(A1; SEARCH (" "; A1) -1) | 'cell B1 = 2004-07-20
At C1 type:
| Code: | | =right (A1; len(A1)-len(B1)-1) | 'cell C1= 15:00:00 _________________ # : - ) |
|
| Back to top |
|
 |
|