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

format cell: problem with date

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


Joined: 30 Aug 2007
Posts: 4

PostPosted: Thu Aug 30, 2007 7:59 am    Post subject: format cell: problem with date Reply with quote

Hi everybody,

This is my first thread in this forum. I have problem regarding the format of the cell. My colleague made an excel file with a row of cells with TIME format but his intention was to make a DATE format, that means the date of birth of the persons engage on one study are expressed as dd.mm.yy Reading the file on OOo I get that row as dd:mm:yy but the format is TIME and not DATE! I dont want to change manually more than 500 data, so is there a quickest way to do it?

Thanks
Enrico
Italy
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10065
Location: Germany

PostPosted: Thu Aug 30, 2007 8:17 am    Post subject: Reply with quote

Could you please post some example values?
For instance:
Excel-editor puts date 31.12.1999
What I see in Calc is a time 31:12:1999
And -most important- the cell's value is 1.32314. Use =N(A1) to show the real numeric value of cell A1.
Back to top
View user's profile Send private message
svigno
Newbie
Newbie


Joined: 30 Aug 2007
Posts: 4

PostPosted: Thu Aug 30, 2007 10:50 pm    Post subject: Reply with quote

The problem is that even Excel treats that cells as TIME format and not DATE format. I think I will have to change mnually all the cells.... Twisted Evil
Back to top
View user's profile Send private message
keme
Moderator
Moderator


Joined: 30 Aug 2004
Posts: 2744
Location: Egersund, Norway

PostPosted: Thu Aug 30, 2007 11:08 pm    Post subject: Reply with quote

Do try to test the values first, like Villeroy suggested. Answers to the follwing questions may help us to help you:

What values (dates) do you enter (actual examples)?
How do you enter them? (Keyboard input, CSV import, Excel worksheet, DDE?)
How are the values displayed (what do you see, again actual examples, please)?
What are the stored numerical values? (Reformat date/time cell as number, or use =N() in a different cell to get the vaue.)
What language (and locale) versions do you use for your operating system and for OpenOffice? (Different locales may treat dates differently.)
Back to top
View user's profile Send private message
svigno
Newbie
Newbie


Joined: 30 Aug 2007
Posts: 4

PostPosted: Fri Aug 31, 2007 1:02 am    Post subject: Reply with quote

The main problem was in a file made in Excel.
In a row of cell the date of birth of people was entered in this way

Name Date of birth
John 12.10.05

That "12.10.05" was entered by my collegue with the intention to put as DATE, that means 12 September 2005 (in italy we put the day before the month). But he didnt know that both excel and OO treat that cell as TIME not as a DATE, that means 12 hour 10 mins 05 sec. OK? Now I want to change all that row from the format 12.10.05 to 12/10/05 without changing manually all the 512 cells.

Thanks
Enrico
Back to top
View user's profile Send private message
jwr
OOo Advocate
OOo Advocate


Joined: 06 Sep 2006
Posts: 367
Location: Germany

PostPosted: Fri Aug 31, 2007 1:33 am    Post subject: Reply with quote

svigno wrote:

That "12.10.05" was entered by my collegue with the intention to put as DATE, that means 12 September 2005 (in italy we put the day before the month). But he didnt know that both excel and OO treat that cell as TIME not as a DATE, that means 12 hour 10 mins 05 sec. OK? Now I want to change all that row from the format 12.10.05 to 12/10/05 without changing manually all the 512 cells.


Bon Giorno Enrico,

This job must be considered easily to be done within 5 minutes:
You may isolate the substrings 12, 10 and 05 in the old field 12.10.05 and concatenate them to a new string 12/10/05 to be inserted in a new column field with appropriate date-formatting.
Then copy/paste this formula into 512 rows.

B.T.W.: The Romans called month #10 "October", as this happened to be month Nr. 8
The new year started by the 1st of March, and of course September is month Nr. 7 Idea

Regards -Hans-
_________________
Windows 2K, OOo-2.3.0, MS-IE-6.0, Firefox-1.0.4, MS Office 97,
Say NO to MS OpenXML: http://www.noooxml.org/petition


Last edited by jwr on Fri Aug 31, 2007 1:49 am; edited 2 times in total
Back to top
View user's profile Send private message
huwg
Super User
Super User


Joined: 14 Feb 2007
Posts: 890

PostPosted: Fri Aug 31, 2007 1:39 am    Post subject: Reply with quote

In that case, first you need to be certain that all the dates were in the years 2000 to 2059.

Any that were not will now be wrong because the month will have been incremented, and only those in December will be easily detectable eg. 03.12.75 becomes 03.13.15 and there is no 13th month.

Any such as 05.07.61 will still look like dates. ie. 05.08.01

Even 06.08.99 will still look like a date ie. 06.09.39

If you know your dates all fell in the range 2000 to 2059 you can use Find & Replace to search for . and replace with /

Make sure Regular expressions is OFF under More Options, and you might need to select your wrongly entered dates first, and turn ON the Current selection only option, to prevent other data that include the . character from being corrupted.

It's that easy.
Back to top
View user's profile Send private message
svigno
Newbie
Newbie


Joined: 30 Aug 2007
Posts: 4

PostPosted: Fri Aug 31, 2007 1:56 am    Post subject: Reply with quote

Thanks huwg.
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