[libreoffice-users] Re: Base Date issue
Okay, thanks for the advice! Naomi -- View this message in context: http://nabble.documentfoundation.org/Base-Date-issue-tp2609086p4007576.html Sent from the Users mailing list archive at Nabble.com. -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Base Date issue
Am 09.09.2012 20:52, naomi.br...@gmail.com wrote: Hi, I've just had the same problem, I want to enter a year in the format , which I can't using the date/time field type. Having read this post I tried to choose an integer and have it set the length to 4, but it won't let me change the length of the integer. Any ideas? Thanks, Naomi A year is an integer. Trying to store an integer number in a date field makes no sense. -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: Base Date issue
On 09/09/2012 02:52 PM, naomi.br...@gmail.com wrote: Hi, I've just had the same problem, I want to enter a year in the format , which I can't using the date/time field type. Having read this post I tried to choose an integer and have it set the length to 4, but it won't let me change the length of the integer. Any ideas? Thanks, Naomi You can have a date field that will show just . However, I doubt that you can do this in a form. For that a field having an Integer type seems a good choice. Suggestions: Small Integer and Integer. The length property for integers states what is the largest or smallest Integer that can be entered into the field. You might be happy using Small Integer since it has a length of 5. This may be a little deceiving since the actual range is from -32768 to +32767. --Dan -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Base Date issue
Hi, I've just had the same problem, I want to enter a year in the format , which I can't using the date/time field type. Having read this post I tried to choose an integer and have it set the length to 4, but it won't let me change the length of the integer. Any ideas? Thanks, Naomi -- View this message in context: http://nabble.documentfoundation.org/Base-Date-issue-tp2609086p4006410.html Sent from the Users mailing list archive at Nabble.com. -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Re: Base Date issue
Le 02/03/11 22:07, Leslie D. Martin a écrit : Hi Leslie, > Except isn't that the entire point of the field mask ''? To tell the > program that although it is a date field the only portion you will be > receiving as input is the year portion? > It wouldn't be the first time in Base that a functionality designed to help the user actually doesn't, or has only been sort-of-implemented. If I were to look at the question from the developer's point of view though: how would Base know which date to actually enter into a DATE field of DDMM if all the user enters is ? Seems to me to be a pretty tall order to meet, unless the developers of HSQLDB (not Oracle or LibO developers), which is the backend to the database functionality, decide to implement a data field type of . At present, the DATE field type corresponds to that represented by the function java.sql.date : http://download.oracle.com/javase/1.4.2/docs/api/java/sql/Date.html which as you can see allows for the date to be garnered through the getYear() method, but this method is not implemented in HSQLDB. So at present, this is not possible transparently within the database engine that is provided for OOo and LibO. > > You confirm my thinking that setting the field to some other format is the > answer, albeit an unsatisfactory answer. I am not seeing an option for a > 4-digit integer in the field definition options so I guess I'll just have to > use a basic numeric format for now. Or a character field. I confirm that you can not modify the length of the INT field using the table creation wizard. It should be possible to do this however if you change the line : SET PROPERTY "sql.enforce_strict_size" false to SET PROPERTY "sql.enforce_strict_size" true which can be found in the SCRIPT file of your ODB file (the ODB file is merely a ZIP container holding all of the data, the forms, queries, table definitions). See here for more details : http://hsqldb.org/doc/guide/ch09.html#datatypes-section > Well, that's disappointing to hear. Hopefully some of the Base developers > who have remained loyal to the OO project will soon get tired of Oracle and > come over to LO. > There is also a move within the LibO developer group to get rid of as much built-in Java dependency as possible, which means that it is likely in the long term that the whole Java HSQLDB database thing will become obsolete, and possibly even removed. Alex -- Unsubscribe instructions: E-mail to users+h...@libreoffice.org List archive: http://listarchives.libreoffice.org/www/users/ *** All posts to this list are publicly archived for eternity ***
Re: [libreoffice-users] Re: Base Date issue
Alex, No it isn't, in the sense that the formatting you specified isn't > applied, but if you configured your database field as DATE, then in Base > that means whatever the locale representation string is, e.g. > "-MM-DD", so Base doesn't understand when you just type in the year. > This is why it works when you type in the whole date. Except isn't that the entire point of the field mask ''? To tell the program that although it is a date field the only portion you will be receiving as input is the year portion? I have no answer to that one other than configuring your database field > as INT(4) and using an integer to represent the year as instead, > but this means that you get only that data in the database, and not the > whole date. I'm pretty certain that this problem has already come up on > the OpenOffice.org forums (but not necessarily their mailing lists). > You confirm my thinking that setting the field to some other format is the answer, albeit an unsatisfactory answer. I am not seeing an option for a 4-digit integer in the field definition options so I guess I'll just have to use a basic numeric format for now. > I can't see this happening in LibO anytime soon, there is a noticeable > and rather worrying dearth of Base developers in the LibO developer's > group. > Well, that's disappointing to hear. Hopefully some of the Base developers who have remained loyal to the OO project will soon get tired of Oracle and come over to LO. Thanks. --- Leslie D. Martin -- Unsubscribe instructions: E-mail to users+h...@libreoffice.org List archive: http://listarchives.libreoffice.org/www/users/ *** All posts to this list are publicly archived for eternity ***
[libreoffice-users] Re: Base Date issue
Le 02/03/11 16:08, Leslie D. Martin a écrit : Hi again Leslie, > Interesting. I have the field masked as which I understood tells Base > to expect and accept only a year number. If I put in a full date (ie, > 01/01/1996) the year shows up correctly. This doesn't seem to be proper > behaviour to me. No it isn't, in the sense that the formatting you specified isn't applied, but if you configured your database field as DATE, then in Base that means whatever the locale representation string is, e.g. "-MM-DD", so Base doesn't understand when you just type in the year. This is why it works when you type in the whole date. > > This, of course, brings up two questions: 1) how do I make this work the way > I need (having a field where the user simply puts in the 14-digit year); I have no answer to that one other than configuring your database field as INT(4) and using an integer to represent the year as instead, but this means that you get only that data in the database, and not the whole date. I'm pretty certain that this problem has already come up on the OpenOffice.org forums (but not necessarily their mailing lists). 2) > how do we get this fixed in Base so that it works correctly without having > to resort to the work-around requested in item 1 (see previous)? I can't see this happening in LibO anytime soon, there is a noticeable and rather worrying dearth of Base developers in the LibO developer's group. Alex -- Unsubscribe instructions: E-mail to users+h...@libreoffice.org List archive: http://listarchives.libreoffice.org/www/users/ *** All posts to this list are publicly archived for eternity ***
Re: [libreoffice-users] Re: Base Date issue
> I seem to recall this being a fairly old bug with OOo. What happens if > you enter the complete date instead ? > Interesting. I have the field masked as which I understood tells Base to expect and accept only a year number. If I put in a full date (ie, 01/01/1996) the year shows up correctly. This doesn't seem to be proper behaviour to me. This, of course, brings up two questions: 1) how do I make this work the way I need (having a field where the user simply puts in the 14-digit year); 2) how do we get this fixed in Base so that it works correctly without having to resort to the work-around requested in item 1 (see previous)? --- Leslie D. Martin -- Unsubscribe instructions: E-mail to users+h...@libreoffice.org List archive: http://listarchives.libreoffice.org/www/users/ *** All posts to this list are publicly archived for eternity ***
[libreoffice-users] Re: Base Date issue
Le 02/03/11 06:20, Leslie D. Martin a écrit : Hi Leslie, > I tried to send this earlier but was having some internet problems and I'm > not sure it got out. I apologize if it is a repost. > As part of an assignment in school I have to create a basic database with > two tables. In one of the tables I have a field set to the "Date" data > type with the format mask set to . It is not set to require an entry in > that field and there is no default value set. Anytime I try to enter a > 4-digit year value, the value always gets changed to "1905". Do I have a > setting wrong somewhere or does the date field require more than just a year > in the mask? I seem to recall this being a fairly old bug with OOo. What happens if you enter the complete date instead ? Alex -- Unsubscribe instructions: E-mail to users+h...@libreoffice.org List archive: http://listarchives.libreoffice.org/www/users/ *** All posts to this list are publicly archived for eternity ***