| getInstance() | ใช้ สร้าง Object DateFormat โดยมีการจัดรูปแบบวันที่และเวลา ให้เป็นแบบ สั้น |
|---|---|
| getDateTimeInstance() | ใช้ สร้าง Object DateFormat โดยมีการจัดรูปแบบวันที่และเวลา ให้เป็นแบบ ยาว |
| getDateInstance() | ใช้ สร้าง Object DateFormat โดยมีการจัดรูปแบบวันที่ ให้เป็นแบบ ยาว |
| getDateInstance ( constant, locale ) | ใช้ สร้าง Object DateFormat โดยมีการจัดรูปแบบวันที่ ตามลักษณะที่กำหนด |
| getTimeInstance() | ใช้ สร้าง Object DateFormat โดยมีการจัดรูปแบบเวลา ให้เป็นแบบ ยาว |
| getTimeInstance ( constant, locale ) | ใช้ สร้าง Object DateFormat โดยมีการจัดรูปแบบเวลา ตามลักษณะที่กำหนด |
| format() | ใช้คืนค่า วันที่และเวลา ที่ได้หลังจากการจัดรูปแบบแล้ว |
| FULL | ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่าเป็น เป็นการจัดรูปแบบวันที่และเวลา แบบเต็ม |
| LONG | ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่าเป็น เป็นการจัดรูปแบบวันที่และเวลา แบบยาว |
| MEDIUM | ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่าเป็น เป็นการจัดรูปแบบวันที่และเวลา แบบย่อ |
| SHORT | ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่าเป็น เป็นการจัดรูปแบบวันที่และเวลา แบบสั้น |
| DEFAULT | ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่าเป็น เป็นการจัดรูปแบบวันที่และเวลา แบบปกติ |
method:getInstance ();
return type:DateFormat
special:static
content:ใช้ สร้าง Object DateFormat โดยมีการจัดรูปแบบวันที่และเวลา ให้เป็นแบบ สั้น
example:DateFormat date_format = DateFormat.getInstance ();
method:getDateTimeInstance ();
return type:DateFormat
special:static
content:ใช้ สร้าง Object DateFormat โดยมีการจัดรูปแบบวันที่และเวลา ให้เป็นแบบ ยาว
example:DateFormat date_format = DateFormat.getDateTimeInstance ();
method:getDateInstance ();
return type:DateFormat
special:static
content:ใช้ สร้าง Object DateFormat โดยมีการจัดรูปแบบวันที่ ให้เป็นแบบ ยาว
example:DateFormat date_format = DateFormat.getDateInstance ();
method:getDateInstance ( constant, locale );
return type:getDateInstance
special:static
content:ใช้ สร้าง Object DateFormat โดยมีการจัดรูปแบบวันที่ ตามลักษณะที่กำหนด
example:Locale locale = new Locale ( "th", "TH" ); DateFormat date_format = DateFormat.getDateInstance ( DateFormat.FULL, locale );
method:getTimeInstance ();
return type:DateFormat
special:static
content:ใช้ สร้าง Object DateFormat โดยมีการจัดรูปแบบเวลา ให้เป็นแบบ ยาว
example:DateFormat date_format = DateFormat.getTimeInstance ();
method:getTimeInstance ( constant, locale );
return type:DateFormat
special:static
content:ใช้ สร้าง Object DateFormat โดยมีการจัดรูปแบบเวลา ตามลักษณะที่กำหนด
example:Locale locale = new Locale ( "th", "TH" ); DateFormat date_format = DateFormat.getTimeInstance ( DateFormat.FULL, locale );
method:format ( object_date );
return type:String
content:ใช้คืนค่า วันที่และเวลา ที่ได้หลังจากการจัดรูปแบบแล้ว
example:DateFormat date_format = DateFormat.getInstance (); String str_datetime = date_format.format ( new Date () );
property:FULL;
return type:int
special:static
content:ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่าเป็น เป็นการจัดรูปแบบวันที่และเวลา แบบเต็ม
example:Locale locale = new Locale ( "th", "TH" ); DateFormat date_format = DateFormat.getDateInstance ( DateFormat.FULL, locale );
property:LONG;
return type:int
special:static
content:ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่าเป็น เป็นการจัดรูปแบบวันที่และเวลา แบบยาว
example:Locale locale = new Locale ( "th", "TH" ); DateFormat date_format = DateFormat.getDateInstance ( DateFormat.LONG, locale );
property:MEDIUM;
return type:int
special:static
content:ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่าเป็น เป็นการจัดรูปแบบวันที่และเวลา แบบย่อ
example:Locale locale = new Locale ( "th", "TH" ); DateFormat date_format = DateFormat.getDateInstance ( DateFormat.MEDIUM, locale );
property:SHORT;
return type:int
special:static
content:ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่าเป็น เป็นการจัดรูปแบบวันที่และเวลา แบบสั้น
example:Locale locale = new Locale ( "th", "TH" ); DateFormat date_format = DateFormat.getDateInstance ( DateFormat.SHORT, locale );
property:DEFAULT;
return type:int
special:static
content:ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่าเป็น เป็นการจัดรูปแบบวันที่และเวลา แบบปกติ
example:Locale locale = new Locale ( "th", "TH" ); DateFormat date_format = DateFormat.getDateInstance ( DateFormat.DEFAULT, locale );