• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in retrieving single digit date and month

anjali reddy
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Sir,
I have the following code. Currently when I insert date in this format 1984/11/14 and also in this format 1984/11/4 and retrieve the following two dates, I could successfully populate the dates into the corresponding fields in the form. But earlier in the database, there are some records created in the following formats:
1984/3/1 and 1987/10/4(i.e.,yyyy/mm/dd).In the form when I try to populate them into their corresponding fields I am able to populate only 1984 into the year filed in the first case and in the second case I could populate 1987 and 10 into the year and month fields. I could not populate the values of the records with single digit either in month or day fields.
By observing the code, could you let me know what needs to be done in order to populate the previously created records with the single digit month and date.

submitForm.elements[evl(i+1)].name = "dd_crmstart"submitForm.elements[evl(i+1)].value = field2

submitForm.elements[evl(i+2)].name = "mm_crmstart"
submitForm.elements[evl(i+2)].value = field3

submitForm.elements[evl(i+3)].name = "yy_crmstart"
submitForm.elements[evl(i+3)].value = field4




String strSQL = "";

strSQL ="select crmtype_code value, item display from code_crmtype order by 2" ;
db.setSQL( strSQL ) ;
db.query() ;
CRMEventVector = db.getSelectionList() ;

db.setSQL( "select LPAD(to_char(month_code),2,'0') value , item display from code_month order by 1" ) ;
db.query() ;
monthVector = db.getSelectionList();

db.setSQL( "select LPAD(to_char(day_code),2,'0') value , item display from code_day order by 1" ) ;
db.query() ;
dayVector = db.getSelectionList();
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!