Skip to Content
author's profile photo Former Member
Former Member

How to get the date default to systems date.

Hi Friends,

I have one small doubt in WDJ,

inPut.setP_Budat();

above attribute is for input date field and the data type is java.sql.date data type.

Now I want to make the date default to systems date.that date looks like (dd.MM.yyyy) foramat

How can I do this.

Regards

Vijay K

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 15, 2010 at 01:05 PM

    Hi ,

    use the below code

    inPut.setP_Budat(new Date(System.currentTimeMillis()) , will set system date

    Regards

    Sunitha

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hi,

      you can try either this way even,

      long twoDay = 2L * 24L * 60L * 60L * 1000L;

      java.util.Date d = new java.util.Date();

      d.setTime(d.getTime() - twoDay);

      It will be helpful.

  • Posted on Sep 15, 2010 at 01:18 PM

    >

    > Hi Friends,

    >

    > I have one small doubt in WDJ,

    >

    > inPut.setP_Budat();

    >

    >

    > above attribute is for input date field and the data type is java.sql.date data type.

    > Now I want to make the date default to systems date.that date looks like (dd.MM.yyyy) foramat

    > How can I do this.

    >

    > Regards

    > Vijay K

    Hi

    Make a simple type and select date as built in type for it and then in the representation tab enter format as dd.MM.yyyy

    it will solve the issue

    Thanks

    Sarbjeet

    Add comment
    10|10000 characters needed characters exceeded