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

date time group???

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


Joined: 23 Apr 2003
Posts: 62
Location: Central Nebraska USA

PostPosted: Thu Aug 18, 2005 7:33 pm    Post subject: date time group??? Reply with quote

Here is one for you OOo gurus out there I know I can set the date that a form is "printed" in the footer but I am interested in some different formats, it may be as easy as making a custom date format code but I am not sure here is the format based on ISO 8601
20050818T2222-0600z the 2005 is of course the year (can be truncated to 05), the 08 is the month, the 18 the day then there is a time separator "T" and the time in a four digit 24 hour format (seconds can be added if needed) but in this case not necessary.
the-0600Z is an hour offset from zulu or GMT/UTC

the second format I am interested in is, the military DTG 1030 GMT on 20th April 2001 is written as 201030Z APR 01.
any ideas?
it would be great if either of these could be generated on each document, that was opened from a template.
Back to top
View user's profile Send private message Yahoo Messenger
JonC
General User
General User


Joined: 25 Jan 2005
Posts: 32
Location: Australia

PostPosted: Thu Aug 18, 2005 8:26 pm    Post subject: Re: date time group??? Reply with quote

Earthshaker wrote:
Here is one for you OOo gurus out there I know I can set the date that a form is "printed" in the footer but I am interested in some different formats, it may be as easy as making a custom date format code but I am not sure here is the format based on ISO 8601
20050818T2222-0600z the 2005 is of course the year (can be truncated to 05), the 08 is the month, the 18 the day then there is a time separator "T" and the time in a four digit 24 hour format (seconds can be added if needed) but in this case not necessary.
the-0600Z is an hour offset from zulu or GMT/UTC

This one seems easy enough except for the zulu offset. Not sure how to get that just yet?

the second format I am interested in is, the military DTG 1030 GMT on 20th April 2001 is written as 201030Z APR 01.
any ideas?
it would be great if either of these could be generated on each document, that was opened from a template.


This one is easy (assuming I am right Smile, the number format string is DDHHMMZ MMM YY
Back to top
View user's profile Send private message Visit poster's website
Dale
Super User
Super User


Joined: 21 Feb 2005
Posts: 1440
Location: Australia

PostPosted: Thu Aug 18, 2005 9:07 pm    Post subject: Re: date time group??? Reply with quote

JonC wrote:
This one is easy (assuming I am right Smile, the number format string is DDHHMMZ MMM YY
I'm pretty sure this won't work in headers & footers.
_________________
Dale
To err is human, but to destroy your slippers in the process takes a real son of a bitch: Me!

OOo documentation from the source
http://documentation.openoffice.org
Guides, FAQ, How Tos
Back to top
View user's profile Send private message
Earthshaker
Power User
Power User


Joined: 23 Apr 2003
Posts: 62
Location: Central Nebraska USA

PostPosted: Fri Aug 19, 2005 5:57 am    Post subject: Reply with quote

The format works good in excel but it appears that calc cannot see/use the system clock
I get an ###error (I think) the =today() function works but not =now(), maybe it is a configuration thing.
Back to top
View user's profile Send private message Yahoo Messenger
Earthshaker
Power User
Power User


Joined: 23 Apr 2003
Posts: 62
Location: Central Nebraska USA

PostPosted: Fri Aug 19, 2005 6:21 am    Post subject: Reply with quote

Question ok now it works, I dunno, are we having fun yet? I have to say with the forums help I am getting better at OOcalc, thanks!
Back to top
View user's profile Send private message Yahoo Messenger
Earthshaker
Power User
Power User


Joined: 23 Apr 2003
Posts: 62
Location: Central Nebraska USA

PostPosted: Fri Aug 19, 2005 7:00 am    Post subject: Reply with quote

ok everything is working but there is one isue with another format in this fomat spaces are not allowed so when I input DDHHMMMMMYY it truncates the output, the way it should read 18(day)0935(time)Aug (month) 05(year) so it becomes 180935Aug05 what I get instead 1809aug05. using a space as a separator between the MM and MMM it works
such a thing as an invisible separator?
now that it works for the most part, I made a custom number format to do what I want to do, but when I close the calc app. it goes away and the next time I have to do it again
I tried a cell styles change in style catalog but it dosen't stay put. What now?
Back to top
View user's profile Send private message Yahoo Messenger
Dale
Super User
Super User


Joined: 21 Feb 2005
Posts: 1440
Location: Australia

PostPosted: Sun Aug 21, 2005 4:27 pm    Post subject: Reply with quote

Earthshaker wrote:
The format works good in excel but it appears that calc cannot see/use the system clock
I get an ###error (I think) the =today() function works but not =now(), maybe it is a configuration thing.
This usually means your column is too narrow to display the result.
Quote:
such a thing as an invisible separator?
Dunno - I wouldn't expect there to be one.
Quote:
now that it works for the most part, I made a custom number format to do what I want to do, but when I close the calc app. it goes away and the next time I have to do it again I tried a cell styles change in style catalog but it dosen't stay put. What now?
I don't really understand what's happening here. Maybe some more information would help.

Your "missing" date/time format might turn up under User Defined formats:
    Format Cells
    Number tab
    Select User Defined in the Category box
    Scroll through the entries in the Format box
See if any of the examples there match your format. If you don't see it there, try the same thing for Date and Time categories.

When you "tried a cell style change" did you create a new style or edit an existing one? I haven't played around much with cell styles. My inclination would be to leave those that come with the application as they are and save any modifications as a new style (ie. with a different name). These will be available next time you open the same spreadsheet. If you want them available every time you open Calc, you will have to save them to a template file, and perhaps make this new template your default. Check this post http://www.oooforum.org/forum/viewtopic.phtml?p=78206#78206 from James and this one http://www.oooforum.org/forum/viewtopic.phtml?p=57291#57291from Gabor.
_________________
Dale
To err is human, but to destroy your slippers in the process takes a real son of a bitch: Me!

OOo documentation from the source
http://documentation.openoffice.org
Guides, FAQ, How Tos
Back to top
View user's profile Send private message
probe1
Moderator
Moderator


Joined: 18 Aug 2004
Posts: 2465
Location: Chonburi Thailand Asia

PostPosted: Sun Aug 21, 2005 4:58 pm    Post subject: Reply with quote

Formatting the cells as Dale wrote works here with spaces at positions you like.

To put your self-defined date in a header/footer of a calc print-out you have to use a macro, because OOo 1.1.x only allows standard time format fields, which are bound to your locale settings. You'll find a macro to set your customized header/footer (example in BASIC) here:
http://www.ooomacros.org/user.php#128903
_________________
Cheers
Winfried
My Macros
DateTime2 extension: insert date, time or timestamp, formatted to your needs
Back to top
View user's profile Send private message Visit poster's website
Earthshaker
Power User
Power User


Joined: 23 Apr 2003
Posts: 62
Location: Central Nebraska USA

PostPosted: Tue Aug 23, 2005 5:34 am    Post subject: Reply with quote

It works now. good enough for my puroses as far as the footer thing, not a big deal one of the cells on the bottom of the sheet will work fine. Now the "missing" user defined format is still missing I will do some poking around and see if I can save it in the formats area, again no biggy I have entered the format so many times by now it is almost automatic. I did save a "standard" template for my "forms" with the number format included, works fine thanks a bunch...until next time Ryan
Back to top
View user's profile Send private message Yahoo Messenger
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