DateTime2

(2 votes)
OOo_DateTime2.jpg

Version 2.0.3 2008-10-13
Provides six functions to insert date or time or timestamp, as text / string or field / value, in Writer / Calc,
Pre-formatted to user needs ( ISO8601 format, adjustable) with German locale strings, English format notation in source: just un-comment.

This extension will install a Basic library/modules with the BASIC macros. They can be used for keyboard shortcut or customized toolbar assignment, or to run them from menu.

For Calc documents, you can configure to overwrite (replace) or add insertion to any existing cell content. Position (pre/post) and separators can be defined. User-defined text can be added, too, to get something like "Call entered at: 2007-10-24 12:34:56"

Download extension
Operating System: System Independent
Official release: 2.0.3
Date: 2008-Oct-15
Size: N/A
License: opensource
Further product information: Product details

Comments

The cumbersome configuration

The cumbersome configuration process has cost me at least two hours of frustration, and I have not got what I want. I have changed the variables mentioned to
public Const MYDATEFORMAT = "NNNN MMMM DD, YYYY"
public Const MYTIMEFORMAT = "HH:MM" [unchanged]
public Const MYTIMESTAMPFORMAT = "NNNN MMMM DD, YYYY HH:MM"

The Datum_Feld, Zeit_Feld and Zeitstempel_Feld macros now work as expected, but the Datum_Text and Zeitstempel_Feld macros still return the date in the format 2009-10-25, completely useless to me.

What further steps are necessary to configure the _Text macros, please?

Kimmus

addition

Please addition routine "Table of valor":

///////////////////////////
Sub MonthCurrent

Dim iMonth as Integer

iMonth = DatePart("m", Now)
Print iMonth

End Sub
/////////////////////

Thank !

To Winfried Rohr

Hello Winfried,

I strived one full day to be able to get date and time together
in a single click in openoffice.org writer.

I wanted date field or time field to show all of this in a single click:

NNNNMMMMDD, YYYY HH:MM AM/PM

In the Insert menu ---> Fields -----> Other ----> Fields box opens and in the first column ---> Document under Type
I clicked ---> Date.
I went in ----> additional formats made the necessary change
then -----> clicked Insert.

However, "Select" column shows "Date" and when I want date on my writer page, I am always getting the text 'Date' and not the date itself.

I thought that after installing your extension the above situation will get corrected.
I will get back at least the functional default 'date', I hoped, but in vain.

Working at it has not helped me solve the problem. I am at an impasse.

I will appreciate if you spare your valuable time and help me resolve this so that on clicking 'date' I do not get the text 'date'.

Best regards,
Dr. Ashok Koparday
-Offending URL removed- by Administrator TBO

Customising insert formats

Dear Ashok,

as described in the document you can change the source to get "your" date or time format:
Open the Basic editor (Tools>Macros>Organise Macros>OpenOffice.org Basic) then locate the DateTime2 library with DateTime module.

At top of the source code you'll find three constant strings, which determines the formats to use:

MYDATEFORMAT
MYTIMEFORMAT
MYTIMESTAMPFORMAT

Change the format strings to your needs - and installed locale language.
English formats are included as a sample - others you will find in OOo Help (F1)

Does this solve you problem?

I get word 'date' instead of getting the date

Hello Winfred,

I am consistently pestered by a problem for which I have spent days trying to resolve.

What happened
I went to Insert -> Fields -> Other -> Date -> Additional Formats.

What is the problem
I am persistently getting the word 'date' instead of the date.

What I tried to resolve
* I have made the necessary changes in macros as you described.
* Removing and reinstalling Open Office from Add/Remove Program has not helped.

What I want
I want date and time in one click NNNN MMMM DD, YYYY HH:MM AM/PM
I use Open Office Writer.

What needs to be done
My software 'language' knowledge is zero.
I pray you to guide me.

I am waiting for your kind reply.

Dr. Ashok Koparday
ask[at]mydoctortells[dot]com