กวดวิชาSQL

SQL HOME บทนำ SQL ไวยากรณ์ SQL SQL Select SQL Select Distinct SQL ที่ไหน SQL และหรือไม่ใช่ คำสั่ง SQL โดย SQL แทรกลงใน ค่าว่างของ SQL SQL Update SQL Delete SQL Select Top SQL Min และ Max SQL Count, Avg, Sum SQL Like SQL Wildcards SQL ใน SQL ระหว่าง นามแฝงของ SQL การรวม SQL SQL Inner Join SQL เข้าร่วมด้านซ้าย SQL Right Join SQL เข้าร่วมแบบเต็ม เข้าร่วมด้วยตนเองของ SQL SQL Union กลุ่ม SQL โดย SQL มี SQL Exists SQL ใด ๆ ทั้งหมด SQL Select Into แทรก SQL ลงใน Select กรณี SQL ฟังก์ชัน SQL Null กระบวนงานที่เก็บไว้ของ SQL ข้อคิดเห็นของ SQL ตัวดำเนินการ SQL

ฐานข้อมูลSQL

SQL สร้าง DB SQL Drop DB ฐานข้อมูลสำรองของ SQL SQL สร้างตาราง SQL Drop Table SQL Alter Table ข้อจำกัดของ SQL SQL ไม่ใช่ Null SQL Unique คีย์หลักของ SQL คีย์ต่างประเทศของ SQL SQL Check SQL Default ดัชนี SQL SQL Auto Increment SQL Dates มุมมอง SQL การฉีด SQL SQL Hosting ประเภทข้อมูล SQL

การอ้างอิงSQL

คีย์เวิร์ด SQL ฟังก์ชัน MySQL ฟังก์ชันเซิร์ฟเวอร์ SQL ฟังก์ชัน MS Access SQL Quick Ref

ตัวอย่างSQL

ตัวอย่าง SQL แบบทดสอบ SQL แบบฝึกหัด SQL ใบรับรอง SQL

รูปแบบ การเข้าถึง MS ()ฟังก์ชัน

ตัวอย่าง

จัดรูปแบบคอลัมน์ "วันเกิด" เป็นวันที่แบบยาว:

SELECT Format(BirthDate, "Long Date") AS FormattedBirthDate
FROM Employees;

ความหมายและการใช้งาน

ฟังก์ชัน Format() จะจัดรูปแบบค่าวันที่ด้วยรูปแบบที่ระบุ

ไวยากรณ์

Format(value, format, firstdayofweek, firstweekofyear)

ค่าพารามิเตอร์

Parameter Description
value Required. The date value to format
format Optional. The format to use.
Format Description
General Date Shows value as a date based on the system settings
Long Date Shows value as a date based on the system's long date settings
Medium Date Shows value as a date based on the system's medium date settings
Short Date Shows value as a date based on the system's short date settings
Long Time Shows value as a date based on the system's long time settings
Medium Time Shows value as a date based on the system's medium time settings
Short Time Shows value as a date based on the system's short time settings
firstdayofweek Optional. Specifies the first day of the week. Can be one of the following values:
  • 0 = Use the NLS API setting
  • 1 = Sunday (this is default)
  • 2 = Monday
  • 3 = Tuesday
  • 4 = Wednesday
  • 5 = Thursday
  • 6 = Friday
  • 7 = Saturday
firstdayofyear Optional. Specifies the first week of the year. Can be one of the following values:
  • 0 = Use the NLS API setting
  • 1 = Use the first week that includes Jan 1st (default)
  • 2 = Use the first week in the year that has at least 4 days
  • 3 = Use the first full week of the year

รายละเอียดทางเทคนิค

ทำงานใน: จากการเข้าถึง 2000