Esercitazione SQL

SQL HOME Introduzione SQL Sintassi SQL Seleziona SQL SQL Seleziona distinto SQL dove SQL e, o, no Ordina SQL per Inserisci SQL in Valori nulli SQL Aggiornamento SQL Elimina SQL SQL Seleziona in alto SQL Min e Max Conteggio SQL, media, somma Mi piace SQL Caratteri jolly SQL SQL In SQL tra Alias ​​SQL Join SQL Join interno SQL Join sinistro SQL SQL Right Join SQL Full Join SQL Self Join Unione SQL Raggruppamento SQL per SQL Avere SQL esiste SQL Qualsiasi, Tutti SQL Seleziona in Inserisci SQL in Seleziona Caso SQL Funzioni SQL Null Stored procedure SQL Commenti SQL Operatori SQL

Database SQL

SQL Crea DB SQL Drop DB DB di backup SQL SQL Crea tabella Tabella di rilascio SQL SQL Alter tabella Vincoli SQL SQL non nullo SQL unico Chiave primaria SQL Chiave esterna SQL Controllo SQL SQL predefinito Indice SQL Incremento automatico SQL Date SQL Viste SQL SQL Injection Hosting SQL Tipi di dati SQL

Riferimenti SQL

Parole chiave SQL Funzioni MySQL Funzioni di SQL Server Funzioni di accesso MS Riferimento rapido SQL

Esempi SQL

Esempi SQL Quiz SQL Esercizi SQL Certificato SQL

Funzione MS Access Format()

Esempio

Formatta la colonna "BirthDate" su una data lunga:

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

Definizione e utilizzo

La funzione Format() formatta un valore di data con il formato specificato.

Sintassi

Format(value, format, firstdayofweek, firstweekofyear)

Valori dei parametri

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

Dettagli tecnici

Funziona in: Da Access 2000