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

Changing default date format in Writer?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
PromptJock
Super User
Super User


Joined: 26 Jul 2006
Posts: 741

PostPosted: Thu Aug 03, 2006 11:23 am    Post subject: Changing default date format in Writer? Reply with quote

Simple question: when I insert a Date field in Writer, it appears in "MM/DD/YY" ("08/03/06") format. I want to CHANGE the default Insert Date Field format to "text date" format (i.e. "August 3, 2006").

I've searched all the Help topics and configuration options in OpenOffice and Writer and can't find the way to do it. Right now, I have to manually change the format after I insert the field - cumbersome, but it works.

Can anyone help me?
Back to top
View user's profile Send private message
pitonyak
Administrator
Administrator


Joined: 09 Mar 2004
Posts: 3655
Location: Columbus, Ohio, USA

PostPosted: Thu Aug 03, 2006 11:43 am    Post subject: Reply with quote

Is the default system date format used for this? If so, can you change your default system format (I mean, on your computer).
_________________
--
Andrew Pitonyak
http://www.pitonyak.org/oo.php
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
jrkrideau
Super User
Super User


Joined: 08 Aug 2005
Posts: 6732
Location: Kingston ON Canada

PostPosted: Thu Aug 03, 2006 11:47 am    Post subject: Re: Changing default date format in Writer? Reply with quote

PromptJock wrote:
Simple question: when I insert a Date field in Writer, it appears in "MM/DD/YY" ("08/03/06") format. I want to CHANGE the default Insert Date Field format to "text date" format (i.e. "August 3, 2006").

I've searched all the Help topics and configuration options in OpenOffice and Writer and can't find the way to do it. Right now, I have to manually change the format after I insert the field - cumbersome, but it works.

Can anyone help me?


Insert >Special Characters> Document > Date ? I think it will do what you want.
_________________
jrkrideau
Kingston ON Canada
Currently using Windows 7 & OOo 3.4.0 and Ubuntu 12.04 & LibreOffice 3.5.2.2
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 9183
Location: Lexinton, Kentucky, USA

PostPosted: Thu Aug 03, 2006 11:53 am    Post subject: Reply with quote

Quote:
Is the default system date format used for this?
My test under Widows indicates it is not.
Back to top
View user's profile Send private message
KSpringer
Newbie
Newbie


Joined: 14 Jun 2006
Posts: 2

PostPosted: Thu Aug 03, 2006 5:13 pm    Post subject: Reply with quote

I'm using 2.0.2 so this may be different for 2.0.3.

I have to use: Insert>Fields>Other>Date
and choose the type of date format you want.

Hope this helps.
Back to top
View user's profile Send private message
dfrench
Moderator
Moderator


Joined: 03 Mar 2003
Posts: 1605
Location: Wellington, New Zealand

PostPosted: Thu Aug 03, 2006 6:06 pm    Post subject: Reply with quote

Assuming that you are using the command Insert > Date from the menu then I think that the only variation is from the locale setting. You could change your configuration by creating a macro to do the Insert>Fields>Other>Date and modifying the menu bar (in Tools > Options) to replace the Insert>Fields > Date by an entry assign to your macro.
Back to top
View user's profile Send private message
PromptJock
Super User
Super User


Joined: 26 Jul 2006
Posts: 741

PostPosted: Fri Aug 04, 2006 7:50 pm    Post subject: Reply with quote

dfrench wrote:
Assuming that you are using the command Insert > Date from the menu then I think that the only variation is from the locale setting. You could change your configuration by creating a macro to do the Insert>Fields>Other>Date and modifying the menu bar (in Tools > Options) to replace the Insert>Fields > Date by an entry assign to your macro.


This is the command sequence I'm using. However, MSword allows one to assign one's preference for date/time displayed with the "Alt+Shift+D" command. One sets the default in word by "Insert, date and time", highlights the desired "default" date/time format, then click the "Default..." button at the lower-left of the opened pane. I didn't closely look to see of Writer's "Insert, date and time..." has that same feature.

If it does, then I've probably just answered my own question and, again, wasted valuable disk space on the Forum's server. Smile If it doesn't, perhaps this would be a good feature to add to the next update release of Writer.

Thank y'all again for your time and trying to assist me while I still "get the hang" of OpenOffice....
Back to top
View user's profile Send private message
dfrench
Moderator
Moderator


Joined: 03 Mar 2003
Posts: 1605
Location: Wellington, New Zealand

PostPosted: Fri Aug 04, 2006 9:38 pm    Post subject: Reply with quote

What I had in mind was creating a macro to do your insert date and assigning it to the keystroke. I found that recording a macro works for this giving a macro of
Code:
sub Main
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(5) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Type"
args1(0).Value = 0
args1(1).Name = "SubType"
args1(1).Value = 1
args1(2).Name = "Name"
args1(2).Value = ""
args1(3).Name = "Content"
args1(3).Value = "0"
args1(4).Name = "Format"
args1(4).Value = 5075
args1(5).Name = "Separator"
args1(5).Value = " "

dispatcher.executeDispatch(document, ".uno:InsertField", "", 0, args1())


end sub
Your milage may vary, recorded macros do not always come out as expected. The format arg sets the date layout.

Save that in your macro library so that it available to you always and not just for the current doc.

Assign it to an available keystroke combination using Tools Customize Keyboard. I do not think that ALT keys are available here but you can use CTRL-SHIFT-....

You might like to review the use of macros and keyboard assignment posts on this and the api and macros forum as well as the HELP
Back to top
View user's profile Send private message
PromptJock
Super User
Super User


Joined: 26 Jul 2006
Posts: 741

PostPosted: Fri Aug 04, 2006 10:41 pm    Post subject: Reply with quote

dfrench wrote:
What I had in mind was creating a macro to do your insert date and assigning it to the keystroke. I found that recording a macro works for this giving a macro of
Code:
sub Main
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(5) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Type"
args1(0).Value = 0
args1(1).Name = "SubType"
args1(1).Value = 1
args1(2).Name = "Name"
args1(2).Value = ""
args1(3).Name = "Content"
args1(3).Value = "0"
args1(4).Name = "Format"
args1(4).Value = 5075
args1(5).Name = "Separator"
args1(5).Value = " "

dispatcher.executeDispatch(document, ".uno:InsertField", "", 0, args1())


end sub
Your milage may vary, recorded macros do not always come out as expected. The format arg sets the date layout.

Save that in your macro library so that it available to you always and not just for the current doc.

Assign it to an available keystroke combination using Tools Customize Keyboard. I do not think that ALT keys are available here but you can use CTRL-SHIFT-....

You might like to review the use of macros and keyboard assignment posts on this and the api and macros forum as well as the HELP


Impressive! thank you for your reply. Smile

FWIW, I investigated the "insert, field, date..." sequence and, unfortunately, there's no option to "default" the date input format like MSWord does. However, I'll try recording a macro and see what it does for me.

Again, thank you for your speedy reply. Smile

Addendum: Dateline 8-5-06, 0001
SUCCESS! Thanks to your suggestion, I was able to successfully record a "Ctrl+L" macro (took a few tries to get "everything corrrect") that inserts the "August 5, 2006" format date field (fixed, of course!) AND bolds it, underlines it, then "newlines" (I use the "long" date to set off separate entries). FWIW, I had a "V8 moment" (SLAP! on forehead, if you remember the old commercial) and should've'en able to figure it out on my own. The effects of getting older, I guess. Wink

Anyhoo, THANK YOU AGAIN for your assistance. Someday, I might get as good as you in helping others out with OpenOffice....

I hope you (and everyone else who replied) have a great weekend!
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 Writer 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