OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Oppositie of concantenate?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
jgillean
General User
General User


Joined: 23 Jul 2004
Posts: 6

PostPosted: Wed Jul 28, 2004 3:02 pm    Post subject: Oppositie of concantenate? Reply with quote

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
View user's profile Send private message
SergeM
Super User
Super User


Joined: 09 Sep 2003
Posts: 3211
Location: Troyes France

PostPosted: Wed Jul 28, 2004 11:44 pm    Post subject: Reply with quote

if you import the data as text, (csv in spreadsheet) you choose blank (" ") as separator.
_________________
Linux & Windows OOo3.0
UNO & C++ : WIKI
http://wiki.services.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
In French
http://wiki.services.openoffice.org/wiki/Documentation/FR/Cpp_Guide
Back to top
View user's profile Send private message Visit poster's website
Iannz
OOo Advocate
OOo Advocate


Joined: 14 Feb 2004
Posts: 494
Location: Christchurch, New Zealand

PostPosted: Thu Jul 29, 2004 12:32 am    Post subject: Reply with quote

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
View user's profile Send private message
r_vinoya
Super User
Super User


Joined: 03 Dec 2003
Posts: 619
Location: Somewhere in the Philippines

PostPosted: Fri Jul 30, 2004 10:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group