MusicSys:unsolved:

Hello Could someone tell me which (if any combination of code to use to put a
date in a derby db using a JFormattedTextField?

createBooking  ...etc
...,
book_date DATE,
....,
...

here are the many tries I have so far

if (i == 3) {
                //I started with this did not work:
                /*
                 * import java.sql.Time;
                 import java.util.Date;
                 */
                 //bookingBean.setBookDate((java.sql.Date) txtFieldArray[i].getValue());//Input=1111-11-11
                //derby db
                //the bean = public Date bookDate;
                /*
                 *  public static final String MASKFORMAT = "##/##/####";
                //public static final String SIMPLEDATEFORMATMASK = "MM/dd/yyyy HH:mm:ss a";<----not using this one
                public static final String SIMPLEDATEFORMATMASK = "MM/dd/yyyy"; <-----------using this thought it was .SHORT?
                private SimpleDateFormat sdf = new SimpleDateFormat(SIMPLEDATEFORMATMASK);

                 */
                //JFormattedTextField with mask and verifier ##/##/#### and MM/dd/yyyy
                //bookingBean.setBookDate((java.util.Date) txtFieldArray[i].getValue());//Input=11/11/2010
                String d = (String) txtFieldArray[i].getValue();
                Date dStr=DateFormat.getDateInstance(DateFormat.SHORT).parse(d);
                bookingBean.setBookDate(dStr);
                //Date dStr=DateFormat.getDateInstance(DateFormat.SHORT).parse(d);
                //DateFormat.getDateInstance(DateFormat.SHORT)
                // Date dStr=DateFormat.getDateInstance().parse(d);
                // Date dStr = DateFormat.getDateInstance().parse(d);
            }

The latest error: using the uncommentd code;

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1214)
        at java.text.DateFormat.parse(DateFormat.java:335)
        at view.formActions.RegisterFormActions.bookingRegisterAction(RegisterFormActions.java:979)
        at view.content.masterGuidePanels.guide.MasterRegisterForm.formFactory(MasterRegisterForm.java:529)
        at view.forms.registerForms.BookingRegisterForm.submitBtnAction(BookingRegisterForm.java:561)
        at view.forms.registerForms.BookingRegisterForm.actionPerformed(BookingRegisterForm.java:315)

Here is an err of the SimpleDateFormat code :

public Date parse(String text, ParsePosition pos)
    {
        int start = pos.index;
        int oldStart = start;
------->	int textLength = text.length();   stops here: I tried sending two params (String,int) did not work

Thank

Recommended Answers

All 5 Replies

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1214)
at java.text.DateFormat.parse(DateFormat.java:335)
at view.formActions.RegisterFormActions.bookingRegisterAction(RegisterFormActions.java:979)

Is RegisterFormActions your program? Look at line 979 and see why it is causing a NPE.

I wish I could look up 979 now but I do not have the whole program with me. But I will
look at it when I get to the program

No it is one of 400+ files

but it is responsible for loading the models for this Register form and many others.
on this form it gets to txtFielArray.get value() and it collects from JFomattedTextField. they all work but the ones that deal with collecting Time or Date:


I need to see the proper way to collect a java.util.Date and in the format specified (or any at this point) but I prefer .SHORT. I think I would be dealing with "MM/dd/yyy" and I think it has to be java.sql.Date to go in derby db in a ex: book_num DATE, column.

and then the same thing with time values

Try debugging the code by printing out the Strings you are trying to parse to see what they look like.

Try debugging the code by printing out the Strings you are trying to parse to see what they look like.

I will try that.

is the uncommented code display how to do this basic operation?


JFormattedText Field starts out with the mask in the text (not sure its value)as:
__/__/____ this mask has always gone into the database and works if I were to go to the db and re populate the form it will deliver back and show __/__/___ MM/dd/yyyy

but when I ask to take the value as a date and move it to the db it throws that exception
that I need two params the string and the position to start parsing but I put the int as the second param it will not except it.

thanks again

hello again:
here is the output you requested. I have to learn to build and use a calender
so if you think I should not spend to much time putting this data in
say so. I imagine another panel will control a calander and feed this form
the perfect final data and formatting classes can do just that format

I just spent a couple hours building this question lol so I will ask it anyway.
Could you think in terms of having the textfields ready to get a (.SHORT DATE
AND A hh:MM A )format only because the data will never go in
the db like it is now.

This is THE PRODUCT OF THE ERROR: at line 68:

I won't be at a computer until tomorrow thanks

@Override
    public boolean insertBooking() throws ProfileException, model.err.LoginException, FileNotFoundException, IOException, SQLException, UnknownUserNameException, IncorrectPasswordException {


        String M = "insertBooking()";
        boolean bInsert = true;
        setTableName(tableName);
        try {
            conn = connect();
            bookingUser = MasterRegisterForm.bookingBean;
            System.out.println(C+M+AND+MasterRegisterForm.getBookingBean().getBookNum()+":getBookNum  : MasterRegisterForm.bookingBean : ");
            System.out.println(C + M + AND + ModelUtils.getXMLResource("insertBooking") + ": : ");
            ps = (PreparedStatement) conn.prepareStatement(
                    ModelUtils.getXMLResource("insertBooking"));

            //ps.setInt(1, bookingUser.getBookNum());
            ps.setString(2, bookingUser.getBookInstrumentType());
             ps.setTime(3, (java.sql.Time) bookingUser.getBookStartTime());
            ps.setTime(4, (java.sql.Time) bookingUser.getBookEndTime());
            ps.setDate(5,  (java.sql.Date)bookingUser.getBookDate());
             ps.setString(6, bookingUser.getBookLocation());
            ps.setString(7, bookingUser.getBookStatus());
             ps.setDate(8, (java.sql.Date) bookingUser.getBookCancelDate());
            ps.setString(9, bookingUser.getBookRefundMemo());
             ps.setString(10, bookingUser.getStuUid());
            ps.setString(11, bookingUser.getInstrUid());
             ps.setString(12, bookingUser.getPayeeUid());
             ps.setInt(13, bookingUser.getPaymentNum());


            int rowCount = ps.executeUpdate();
            if (rowCount != 1) {
                throw new RegisterException();
            } else {
                throw new SuccessfullRegistrationMessage();
            }

The formatters in use:

package view.utils.formattedFields;

import java.awt.event.*;
import java.util.Date;
import java.util.GregorianCalendar;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.text.*;
import javax.swing.*;
import javax.swing.text.DefaultFormatterFactory;
import javax.swing.text.MaskFormatter;

/**
 *  Provides a class that allows the formatted entry of dates.
 * 
 * @author Mark Pendergast
 * Copyright Mark Pendergast
 */
public class FormattedDateField  extends JFormattedTextField implements ActionListener, Serializable{
    private PropertyChangeSupport propertySupport;
    public static final String PROP_TICKING_PROPERTY = "clock is active";

    public static final String MASKFORMAT = "##/##/#### ##:##:## UM";
    //public static final String MASKFORMAT = "##/##/####";
    // public static final String MASKFORMAT = "##/##/##";
    public static final String SIMPLEDATEFORMATMASK = "MM/dd/yyyy HH:mm:ss a";
     //public static final String SIMPLEDATEFORMATMASK = "MM/dd/yyyy";
     // public static final String SIMPLEDATEFORMATMASK = "MM/dd/yy";
    private SimpleDateFormat sdf = new SimpleDateFormat(SIMPLEDATEFORMATMASK);

    private static final int TIMERINTERVAL = 1000;
    private Timer timer = new Timer(TIMERINTERVAL,this);
    
    private boolean ticking = true;
   /**
    * Default constructor, uses current date as value
    * @throws java.text.ParseException
    */ 
    public FormattedDateField() throws ParseException
    {
      this(new Date());
    }
    /**
     *  Constructor that uses a GregorianCalendar object as initial value
     * @param cal initial value, GregorianCalendar object
     * @throws java.text.ParseException
     */
    public FormattedDateField(GregorianCalendar cal)  throws ParseException
    {
      this(cal.getTime());
    }
    /**
     * Constructor that accepts year/month/day for the initial value
     * @param year inital year
     * @param month inital month
     * @param day initial day
     * @throws java.text.ParseException
     */
    public FormattedDateField(int year, int month, int day)  throws ParseException
    {
       this(new GregorianCalendar(year, month, day).getTime());
    }
   /**
    * Constructor that accepts year/month/day/hour/min/sec as initial value
    * 
    * @param year inital year
    * @param month inital month (0-11)
    * @param day initial day (0-30)
    * @param hour inital hour (0-23)
    * @param min inital min (0-59)
    * @param sec inital second (0-59)
    * @throws java.text.ParseException
    */
   public FormattedDateField(int year, int month, int day, int hour, int min, int sec) throws ParseException
   {
      this(new GregorianCalendar(year, month, day, hour, min, sec).getTime());
       
   }    
   /**
    * Constructor that accepts initial value as a Date object. Sets up the formatters
    * 
    * @param date
    * @throws java.text.ParseException
    */
    public FormattedDateField(Date date) throws ParseException
    {
      
      //setValue(sdf.format(date));
      propertySupport = new PropertyChangeSupport(this);
      setInputVerifier(new view.utils.formattedFields.verifiers.DateVerifier(SIMPLEDATEFORMATMASK));
  
      MaskFormatter mf = new MaskFormatter(MASKFORMAT);
      mf.setValidCharacters("0123456789AP");
      mf.setPlaceholderCharacter('_');     
      mf.setValueClass(String.class);
      DefaultFormatterFactory dff = new DefaultFormatterFactory(mf);
      setFormatterFactory(dff);
      if(ticking)
          timer.start();
     }
    /**
     * retrieve the current value as a Date object
     * @return Current value as a Date object
     * @throws java.text.ParseException
     */
    public Date getDate() throws ParseException
    {
      return sdf.parse((String)getValue());
    }
    /**
     * Set the current value
     * @param date new current value
     */
    public void setDate(Date date)
    {
      setValue(sdf.format(date));
    }
    /**
     * get the current value as a GregorianCalendar object
     * @return current value
     * @throws java.text.ParseException
     */
    public GregorianCalendar getCalendar() throws ParseException
    {
     GregorianCalendar cal = new GregorianCalendar();   
     cal.setTime(getDate());
     return cal;
    }
    /**
     *  returns the value of the ticking field
     * @return true if the field is active, false if not
     */
    public boolean isTicking()
    {
     return ticking;
    }
    /**
     * turns the clock on/off, when on the field updates every second
     * @param value true for on, false for off
     */
    public void setTicking(boolean value)
    {
      boolean old = ticking;
      ticking = value;
      if(ticking)
          timer.start();
      else
          timer.stop();      
     propertySupport.firePropertyChange(PROP_TICKING_PROPERTY, old, value);
    }
    /**
     *  process the timer event, if the timer is on, update the current value by the time interval
     * @param evt
     */
    public void actionPerformed(ActionEvent evt)
    {
      if(evt.getSource() == timer)
      {
        if(isFocusOwner())  // don't mess with the time if editing
          return;
        
        try{
         Date value = getDate();         
         value.setTime(value.getTime()+TIMERINTERVAL);
         setDate(value);
        }
        catch(Exception e)
        {           
        }        
      }
    }
    
}

the output

///////////////////////// AccessAllTables: switchTheTableNameFindBean(String thisTable) : BOOKING: thisTable : 
CREATED NEW INSTANCE OF ConnectBookingDAO
name: BOOK_NUM
name: BOOK_INSTRUMENT_TYPE
name: BOOK_START_TIME
name: BOOK_END_TIME
name: BOOK_DATE
name: BOOK_LOCATION
name: BOOK_STATUS
name: BOOK_CANCEL_DATE
name: BOOK_REFUND_MEMO
name: STU_UID
name: INSTR_UID
name: PAYEE_UID
name: PAYMENT_NUM
value: SMALLINT
value: VARCHAR
value: TIME
value: TIME
value: DATE
value: VARCHAR
value: VARCHAR
value: DATE
value: VARCHAR
value: VARCHAR
value: VARCHAR
value: VARCHAR
value: INTEGER
/////////////////////////AdminRegisterOptionsPanel: addAction() : : YOU HAVE!  :  BookingEditForm rf = new BookingEditForm(); : 
///////////////////// BookingRegisterForm: buildForm() : 13:columnNameList.size() : 
///////////////////// BookingRegisterForm: buildForm() : 0: MODIFIER : 
create the uid txtfield: BOOK_INSTRUMENT_TYPE
create the uid txtfield: BOOK_LOCATION
create the uid txtfield: BOOK_STATUS
create the uid txtfield: BOOK_REFUND_MEMO
create the uid txtfield: STU_UID
create the uid txtfield: INSTR_UID
create the uid txtfield: PAYEE_UID
///////////////////// BookingRegisterForm: buildForm() : 0:  primaryKeyIndex : 
///////////////////// BookingRegisterForm: buildForm() : 0:  primaryKeyIndex : 
///////////////////// BookingRegisterForm: chkEmptyFields() : GENERATED: txtFieldArray[UIDSEARCHFIELD].getText() : 
///////////////////// BookingRegisterForm: chkEmptyFields() : true: returns : 
message: Validation Complete
///////////////////// BookingRegisterForm: chkEmptyUpdateFields() : 13: txtFieldArray.length; : 
///////////////////// BookingRegisterForm: chkEmptyUpdateFields() : true: returns : 
///////////////////// BookingRegisterForm: chkEmptyUpdateFields() : 13: txtFieldArray.length; : 
///////////////////// BookingRegisterForm: chkEmptyUpdateFields() : true: returns : 
CONFIRM!: Update this record?
///////////////////// BookingRegisterForm: submitBtnAction() : : caller : 
/////////////////////////MasterRegisterForm: formFactory(String tableName) : BOOKING:tableName : 
CREATED NEW INSTANCE OF ConnectBookingDAO
RegisterFormActions: bookingRegisterAction() : 0: txtFieldArray[0].getValue() : 
RegisterFormActions: bookingRegisterAction() : GENERATED: txtFieldArray[0].getText() : 
RegisterFormActions: bookingRegisterAction() : CLASSICAL GUITAR    : txtFieldArray[1].getText() : 
RegisterFormActions: bookingRegisterAction() : null: txtFieldArray[2].getValue() : 
RegisterFormActions: bookingRegisterAction() : null: txtFieldArray[3].getValue() : 
RegisterFormActions: bookingRegisterAction() : null: txtFieldArray[3].getValue() : 
RegisterFormActions: bookingRegisterAction() : __:__ _: dStr) : 
RegisterFormActions: bookingRegisterAction() : 11/11/2010 05:01:02 AM: txtFieldArray[4].getText() : 
RegisterFormActions: bookingRegisterAction() : SOUTH SIDE: txtFieldArray[5].getText() : 
RegisterFormActions: bookingRegisterAction() : null: txtFieldArray[6].getValue() : 
RegisterFormActions: bookingRegisterAction() : 11/11/2010 05:00:56 AM: txtFieldArray[7].getText() : 
RegisterFormActions: bookingRegisterAction() : FALSE: txtFieldArray[8].getText() : 
RegisterFormActions: bookingRegisterAction() : LITTLE JOHNIE   : txtFieldArray[9].getText() : 
RegisterFormActions: bookingRegisterAction() : MOZART: txtFieldArray[10].getText() : 
RegisterFormActions: bookingRegisterAction() : RICHIE RICH: str : 
RegisterFormActions: bookingRegisterAction() : null: txtFieldArray[11].getValue() : 
ConnectBookingDAO: boolean insertBooking() : : caller : 
BookingSupplementalDAO: insertBooking() : 0:getBookNum  : MasterRegisterForm.bookingBean : 
BookingSupplementalDAO: insertBooking() : INSERT INTO booking(    
    book_instrument_type,
    book_start_time,
    book_end_time,
    book_date,
    book_location,
    book_status,
    book_cancel_date,
    book_refund_memo,
    stu_uid,
    instr_uid,
        payee_uid,
    payment_num)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) : : 
Sep 24, 2010 1:43:30 PM view.forms.registerForms.BookingRegisterForm actionPerformed
SEVERE: null
java.sql.SQLDataException: The syntax of the string representation of a datetime value is incorrect.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.noStateChangeException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setString(Unknown Source)
        at model.supplementalDAO.BookingSupplementalDAO.insertBooking(BookingSupplementalDAO.java:68)
        at model.dao.ConnectBookingDAO.insertBooking(ConnectBookingDAO.java:249)
        at view.formActions.RegisterFormActions.bookingRegisterAction(RegisterFormActions.java:1221)
        at view.content.masterGuidePanels.guide.MasterRegisterForm.formFactory(MasterRegisterForm.java:533)
        at view.forms.registerForms.BookingRegisterForm.submitBtnAction(BookingRegisterForm.java:561)
        at view.forms.registerForms.BookingRegisterForm.actionPerformed(BookingRegisterForm.java:315)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
        at java.awt.Component.processMouseEvent(Component.java:6134)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
        at java.awt.Component.processEvent(Component.java:5899)
        at java.awt.Container.processEvent(Container.java:2023)
        at java.awt.Component.dispatchEventImpl(Component.java:4501)
        at java.awt.Container.dispatchEventImpl(Container.java:2081)
        at java.awt.Component.dispatchEvent(Component.java:4331)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4301)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3895)
        at java.awt.Container.dispatchEventImpl(Container.java:2067)
        at java.awt.Window.dispatchEventImpl(Window.java:2458)
        at java.awt.Component.dispatchEvent(Component.java:4331)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.sql.SQLException: The syntax of the string representation of a datetime value is incorrect.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
        ... 36 more
Caused by: ERROR 22007: The syntax of the string representation of a datetime value is incorrect.
        at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
        at org.apache.derby.iapi.types.DateTimeParser.parseInt(Unknown Source)
        at org.apache.derby.iapi.types.SQLTime.parseTime(Unknown Source)
        at org.apache.derby.iapi.types.SQLTime.setValue(Unknown Source)
        ... 32 more

the RegisterFormAction.java collecting data:

public void bookingRegisterAction() throws UnknownUserNameException, IncorrectPasswordException, LoginException, SQLException, FileNotFoundException, IOException, ProfileException, IOException, FileNotFoundException, PropertyVetoException, ProfileException, LoginException, SQLException, javax.security.auth.login.LoginException, ClassNotFoundException, InstantiationException, IllegalAccessException, UnknownUserNameException, IncorrectPasswordException, NoTargetFoldersException, SuccessfullTargetFoldersCreation, SuccessfullLoginMessage, RegisterException, IncorrectEmailException, SuccessfullRegistrationMessage, SendConfirmationEmailMessage, SubscribeException, DuplicateRegisterException, DuplicateEmailException, DuplicateUserException, MappingException, ParseException {

        String M = "bookingRegisterAction()";

        for (int i = 0; i < txtFieldArray.length; i++) {
            if (i == 0) {
                bookingBean.setBookNum((Integer) txtFieldArray[i].getValue());
                String str = txtFieldArray[i].getText();
                 System.out.println(C + M + AND + txtFieldArray[i].getValue() + ": txtFieldArray["+ i+"].getValue() : ");


                setThisUid(str);
                System.out.println(C + M + AND + str + ": txtFieldArray["+i+"].getText() : ");
            }
            if (i == 1) {
                bookingBean.setBookInstrumentType(txtFieldArray[i].getText());
                System.out.println(C + M + AND + txtFieldArray[i].getText() + ": txtFieldArray["+i+"].getText() : ");


            }
            if (i == 2) {

                bookingBean.setBookStartTime((Time) txtFieldArray[i].getValue());
                System.out.println(C + M + AND + txtFieldArray[i].getValue() + ": txtFieldArray["+ i+"].getValue() : ");




            }
            if (i == 3) {

                bookingBean.setBookEndTime((Time) txtFieldArray[i].getValue());
                System.out.println(C + M + AND + txtFieldArray[i].getValue() + ": txtFieldArray["+ i+"].getValue() : ");


            }
            if (i == 3) {
                String dStr = (txtFieldArray[i].getText());
                //bookingBean.setBookDate((java.util.Date) formatter.parse(dStr));
                System.out.println(C + M + AND + txtFieldArray[i].getValue() + ": txtFieldArray["+ i+"].getValue() : ");
                System.out.println(C + M + AND + dStr + ": dStr) : ");


            }
            if (i == 4) {
                bookingBean.setBookLocation(txtFieldArray[i].getText());
                 System.out.println(C + M + AND + txtFieldArray[i].getText() + ": txtFieldArray["+i+"].getText() : ");


            }
            if (i == 5) {
                bookingBean.setBookStatus(txtFieldArray[i].getText());
                 System.out.println(C + M + AND + txtFieldArray[i].getText() + ": txtFieldArray["+i+"].getText() : ");


            }
            if (i == 6) {
                //bookingBean.setBookCancelDate((Date) txtFieldArray[i].getValue());
                System.out.println(C + M + AND + txtFieldArray[i].getValue() + ": txtFieldArray["+ i+"].getValue() : ");


            }
            if (i == 7) {
                bookingBean.setBookRefundMemo(txtFieldArray[i].getText());
                 System.out.println(C + M + AND + txtFieldArray[i].getText() + ": txtFieldArray["+i+"].getText() : ");


            }


            if (i == 8) {
                bookingBean.setStuUid(txtFieldArray[i].getText());
                 System.out.println(C + M + AND + txtFieldArray[i].getText() + ": txtFieldArray["+i+"].getText() : ");


            }
            if (i == 9) {
                bookingBean.setInstrUid(txtFieldArray[i].getText());
                 System.out.println(C + M + AND + txtFieldArray[i].getText() + ": txtFieldArray["+i+"].getText() : ");


            }
            if (i == 10) {
                bookingBean.setPayeeUid(txtFieldArray[i].getText());
                 System.out.println(C + M + AND + txtFieldArray[i].getText() + ": txtFieldArray["+i+"].getText() : ");


            }
            if (i == 11) {
                bookingBean.setPaymentNum((Integer) txtFieldArray[i].getValue());
                String str = txtFieldArray[i].getText();
                System.out.println(C + M + AND + str + ": str : ");

                System.out.println(C + M + AND + txtFieldArray[i].getValue() + ": txtFieldArray["+ i+"].getValue() : ");


            }

        }

        ConnectBookingDAO book = new ConnectBookingDAO();
        book.insertBooking();

    }
    //int len=txtFieldArray.length-MODIFIER;

thanks for your time.

if you know any links for working with a calender that would be great.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.