| new SimpleDateFormat () | ใข้สร้าง Object SimpleDateFormat |
|---|---|
| new SimpleDateFormat ( pattern ) | ใข้สร้าง Object SimpleDateFormat โดยมีการจัดรูปแบบไว้ |
| new SimpleDateFormat ( pattern, locale ) | ใข้สร้าง Object SimpleDateFormat โดยมีการจัดรูปแบบไว้ |
| new SimpleDateFormat ( pattern, dateformatsymbols ) | ใข้สร้าง Object SimpleDateFormat โดยมีการจัดรูปแบบไว้ |
| applyPattern() | ใช้กำหนดรูปแบบ วันที่และเวลา ให้กับ Object SimpleDateFormat |
| applyLocalizedPattern() | ใช้กำหนดรูปแบบ วันที่และเวลา ให้กับ Object SimpleDateFormat |
| setDateFormatSymbols() | ใช้กำหนดรูปแบบ วันที่และเวลา ในรูปแบบของ object DateFormatSymbols |
| getDateFormatSymbols() | ใช้คืนค่า การจัดรูปแบบของวันที่และเวลา ในรูปแบบของ object DateFormatSymbols |
| format() | ใช้คืนค่า วันที่และเวลา ที่จัดรูปแบบแล้ว |
method:new SimpleDateFormat ();
return type:SimpleDateFormat
content:ใข้สร้าง Object SimpleDateFormat
example:SimpleDateFormat simple_date_format = new SimpleDateFormat ();
method:new SimpleDateFormat ( pattern );
return type:SimpleDateFormat
content:ใข้สร้าง Object SimpleDateFormat โดยมีการจัดรูปแบบไว้
example:SimpleDateFormat simple_date_format = new SimpleDateFormat ( "E d mmm yy" );
method:new SimpleDateFormat ( pattern, locale );
return type:SimpleDateFormat
content:ใข้สร้าง Object SimpleDateFormat โดยมีการจัดรูปแบบไว้
example:Locale locale = new Locale ( "th", "TH" ); SimpleDateFormat simple_date_format = new SimpleDateFormat ( "E d mmm yy", locale );
method:new SimpleDateFormat ( pattern, dateformatsymbols );
return type:SimpleDateFormat
content:ใข้สร้าง Object SimpleDateFormat โดยมีการจัดรูปแบบไว้
example:DateFormatSymbols date_format_symbols = new DateFormatSymbols (); SimpleDateFormat simple_date_format = new SimpleDateFormat ( "E d mmm yy", date_format_symbols );
method:applyPattern ( pattern );
return type:void
content:ใช้กำหนดรูปแบบ วันที่และเวลา ให้กับ Object SimpleDateFormat
example:SimpleDateFormat simple_date_format = new SimpleDateFormat (); simple_date_format.applyPattern ( "E d mmm yy" );
method:applyLocalizedPattern ( pattern );
return type:void
content:ใช้กำหนดรูปแบบ วันที่และเวลา ให้กับ Object SimpleDateFormat
example:SimpleDateFormat simple_date_format = new SimpleDateFormat (); simple_date_format.applyLocalizedPattern ( "E d mmm yy" );
method:setDateFormatSymbols ( object_dateformatsymbols );
return type:void
content:ใช้กำหนดรูปแบบ วันที่และเวลา ในรูปแบบของ object DateFormatSymbols
example:DateFormatSymbols date_format_symbols = new DateFormatSymbols (); SimpleDateFormat simple_date_format = new SimpleDateFormat (); simple_date_format.setDateFormatSymbols ( date_format_symbols );
method:getDateFormatSymbols ();
return type:DateFormatSymbols
content:ใช้คืนค่า การจัดรูปแบบของวันที่และเวลา ในรูปแบบของ object DateFormatSymbols
example:SimpleDateFormat simple_date_format = new SimpleDateFormat (); DateFormatSymbols date_format_symbols = simple_date_format.getDateFormatSymbols ();
method:format ( object_date );
return type:String
content:ใช้คืนค่า วันที่และเวลา ที่จัดรูปแบบแล้ว
example:SimpleDateFormat simple_date_format = new SimpleDateFormat (); String str = simple_date_format.format ( new Date () );