Date type

I need to pass a date parameter to a method, in which format should I pass this?Eg.FirstCustomer.setDateOfBirth(Date arg0);
[144 byte] By [J0na] at [2007-11-27 7:47:54]
# 1
FirstCustomer.setDateOfBirth(Date arg0); is okay. whats your problem?
j_shadinataa at 2007-7-12 19:28:58 > top of Java-index,Java Essentials,New To Java...
# 2

I am guessing you mean as a string format. Well you decide that yourself because you need to transform the string date into a Date manually using the SimpleDateFormat class. Example:

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");

Date date = sdf.parse("2006-06-30");

gimbal2a at 2007-7-12 19:28:58 > top of Java-index,Java Essentials,New To Java...
# 3
> FirstCustomer.setDateOfBirth(Date arg0); is okay.No, it won't compile.
jverda at 2007-7-12 19:28:58 > top of Java-index,Java Essentials,New To Java...
# 4
Thanks I actually needed to know what to pass as arg0. Does SimpleDateFormat require an 'imports' statement, coz the IDE is complaining that it cannot be resolved?
J0na at 2007-7-12 19:28:58 > top of Java-index,Java Essentials,New To Java...
# 5
yeah... i was slipped.
j_shadinataa at 2007-7-12 19:28:58 > top of Java-index,Java Essentials,New To Java...
# 6
Which?
J0na at 2007-7-12 19:28:58 > top of Java-index,Java Essentials,New To Java...