| View previous topic :: View next topic |
| Author |
Message |
Earthshaker Power User


Joined: 23 Apr 2003 Posts: 62 Location: Central Nebraska USA
|
Posted: Thu Aug 18, 2005 7:33 pm Post subject: date time group??? |
|
|
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 |
|
 |
JonC General User

Joined: 25 Jan 2005 Posts: 32 Location: Australia
|
Posted: Thu Aug 18, 2005 8:26 pm Post subject: Re: date time group??? |
|
|
| 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 , the number format string is DDHHMMZ MMM YY |
|
| Back to top |
|
 |
Dale Super User

Joined: 21 Feb 2005 Posts: 1440 Location: Australia
|
Posted: Thu Aug 18, 2005 9:07 pm Post subject: Re: date time group??? |
|
|
| JonC wrote: | This one is easy (assuming I am right , 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 |
|
 |
Earthshaker Power User


Joined: 23 Apr 2003 Posts: 62 Location: Central Nebraska USA
|
Posted: Fri Aug 19, 2005 5:57 am Post subject: |
|
|
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 |
|
 |
Earthshaker Power User


Joined: 23 Apr 2003 Posts: 62 Location: Central Nebraska USA
|
Posted: Fri Aug 19, 2005 6:21 am Post subject: |
|
|
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 |
|
 |
Earthshaker Power User


Joined: 23 Apr 2003 Posts: 62 Location: Central Nebraska USA
|
Posted: Fri Aug 19, 2005 7:00 am Post subject: |
|
|
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 |
|
 |
Dale Super User

Joined: 21 Feb 2005 Posts: 1440 Location: Australia
|
Posted: Sun Aug 21, 2005 4:27 pm Post subject: |
|
|
| 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 |
|
 |
probe1 Moderator


Joined: 18 Aug 2004 Posts: 2465 Location: Chonburi Thailand Asia
|
Posted: Sun Aug 21, 2005 4:58 pm Post subject: |
|
|
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 |
|
 |
Earthshaker Power User


Joined: 23 Apr 2003 Posts: 62 Location: Central Nebraska USA
|
Posted: Tue Aug 23, 2005 5:34 am Post subject: |
|
|
| 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 |
|
 |
|