cancel
Showing results for 
Search instead for 
Did you mean: 

High Date in Java

Former Member
0 Kudos

Hi all

I need to send as input to an RFC the highdate value.

ie. 9999-12-31

I cannot change the RFC to default the input.

Can anyone tell me how to set a java.sql.date to the value 9999-12-31?

Thanks in advance

Anton Kruse

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you need to format the date before calling the RFC:


Calendar c = Calendar.getInstance();
c.set(9999, 11, 31);

Date d = new Date(c.getTimeInMillis());
Format formatter = new SimpleDateFormat("yyyy-MM-dd");     
String s = formatter.format(d); //s = "9999-12-31"

Regards,

Satyajit.

Answers (1)

Answers (1)

Former Member
0 Kudos

managed to get it working by using the following code:

java.sql.Date sqlDateAugust = java.sql.Date.valueOf( "9999-12-31" );