---
sourceDocument: Australia API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/api-reference

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# GlideDate - Global

# GlideDate - Global {#ariaid-title1}

Release version: Australia  
Updated March 12, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 11 minutes to read  
The GlideDate class provides methods for performing operations on
GlideDate objects, such as instantiating GlideDate objects or working with GlideDate
fields.

For guidance on date time input strings with a list of common format conflicts, refer to [Date and time format guidelines](https://servicenow-prod.fluidtopics.net/UXADUvPefaxebsUlbwbIlw#date-and-time-format-guidelines "You can specify a date format with a sequence of specific date and time pattern strings. A pattern string consists of one or more uppercase and lowercase letters from A to Z. Any text within quotation marks is ignored and is instead copied into the date output.").

See also [GlideDateTime - Global](https://servicenow-prod.fluidtopics.net/E1zpSLs~vIruu2Khr~X07A#c_GlideDateTimeAPI "The GlideDateTime class provides methods for performing operations on GlideDateTime objects.").

## GlideDate - GlideDate() {#ariaid-title2}

Creates a GlideDate object with the current date time.
{#GlideDate-GlideDate__table_vy2_525_jq__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 1. Parameters]

{#GlideDate-GlideDate__table_vy2_525_jq}  

    //Today's date is April 21, 2021
    var gd = new GlideDate();
    gs.info(gd.getValue());

Output:

    2021-04-21

## GlideDate - getByFormat(String format) {#ariaid-title3}

Gets the date in the specified date format.
{#GlideDate-getByFormat_S__table_vy2_525_jq__entry__3}

| Name | Type | Description |
|-|-|-|
| format | String | Desired date format using Java [SimpleDateFormat](https://docs.oracle.com/javase/10/docs/api/java/text/SimpleDateFormat.html). For example, `"dd-MM-yyyy"` to get the day, month, and year, or `"EEEE"` to get the day of the week. |
[Table 2. Parameters]

{#GlideDate-getByFormat_S__table_vy2_525_jq} {#GlideDate-getByFormat_S__table_qpt_3f5_jq__entry__2}

| Type | Description |
|-|-|
| String | Date value for the GlideDate object in the specified format. |
[Table 3. Returns]

{#GlideDate-getByFormat_S__table_qpt_3f5_jq}  

    var gd = new GlideDate(); 
    gd.setValue('2021-04-21');
    gs.info(gd.getByFormat("dd-MM-yyyy"));

Output:

    21-04-2021

### Scoped equivalent {#GlideDate-getByFormat_S__section_w2m_sxr_mcb}

To use this method in a scoped application, use the corresponding scoped method: [Scoped GlideDate - getByFormat(String format)](https://servicenow-prod.fluidtopics.net/Yhbx~AEA0DN5MC6rZ2Uv0Q#r_ScopedGlideDateGetByFormat_String "Gets the date in the specified date format.").

## GlideDate - getDayOfMonthNoTZ() {#ariaid-title4}

Gets the day of the month stored by the GlideDate object, expressed in the UTC time
zone.
{#GlideDate-getDayOfMonthNoTZ__table_gdd_z5q_yv__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 4. Parameters]

{#GlideDate-getDayOfMonthNoTZ__table_gdd_z5q_yv} {#GlideDate-getDayOfMonthNoTZ__table_hdd_z5q_yv__entry__2}

| Type | Description |
|-|-|
| Number | The day of the month in the UTC time zone, from 1 to 31. |
[Table 5. Returns]

{#GlideDate-getDayOfMonthNoTZ__table_hdd_z5q_yv}  

    //Today's date is 2016-05-13 
    var gd =new GlideDate();
    gs.info(gd.getDayOfMonthNoTZ());

Output:

    13

### Scoped equivalent {#GlideDate-getDayOfMonthNoTZ__section_w2m_sxr_mcb}

To use this method in a scoped application, use the corresponding scoped method: [Scoped GlideDate -
getMonthNoTZ()](https://servicenow-prod.fluidtopics.net/Yhbx~AEA0DN5MC6rZ2Uv0Q#r_SGD-getMonthNoTZ "Gets the month stored by the GlideDate object, expressed in the UTC time zone.").

## GlideDate - getDisplayValue() {#ariaid-title5}

Gets the date and time field value in the UTC time zone.
See also: [Scoped GlideDate - getDisplayValue()](https://servicenow-prod.fluidtopics.net/Yhbx~AEA0DN5MC6rZ2Uv0Q#r_ScopedGlideDateGetDisplayValue "Gets the date and time field value in the UTC time zone.")
{#GlideDate-getDisplayValue__table_vy2_535_jq__entry__3}

| Name | Type | Description |
|-|-|-|
| none |   |   |
[Table 6. Parameters]

{#GlideDate-getDisplayValue__table_vy2_535_jq} {#GlideDate-getDisplayValue__table_qpt_3f5_jq__entry__2}

| Type | Description |
|-|-|
| String | Date value for the GlideDate object in the UTC time zone. |
[Table 7. Returns]

{#GlideDate-getDisplayValue__table_qpt_3f5_jq}  

    var gd = new GlideDate(); 
    gd.setValue('2025-04-21');
    gs.info(gd.getDisplayValue());

Output:

    2025-04-21

### Scoped equivalent {#GlideDate-getDisplayValue__section_w2m_sxr_mcb}

To use this method in a scoped application, use the corresponding scoped method: [Scoped GlideDate -
getDisplayValue()](https://servicenow-prod.fluidtopics.net/Yhbx~AEA0DN5MC6rZ2Uv0Q#r_ScopedGlideDateGetDisplayValue "Gets the date and time field value in the UTC time zone.").

## GlideDate - getDisplayValueEx(String style) {#ariaid-title6}

Returns the date using the current user's timezone and a specified format.
{#GlideDate-getDisplayValueEx_S__table_tg4_ckc_b3c__entry__3}

| Name | Type | Description |
|-|-|-|
| style | String | Format to use for the date. Valid values (case insensitive): * `short`: M/D/YY or D/M/YY depending on the current user's language. For example, 1/27/26 or 27/1/26. * `medium`: Abbreviated month, day, and year. For example, Jan 27, 2026. * `long`: Month, day, and year. For example, January 27, 2026. * `full`: Day of the week, month, day, and year. For example, Tuesday, January 27, 2026. {#GlideDate-getDisplayValueEx_S__ul_ayn_24g_b3c} The date is returned in the current user's language. The language determines the order of month and day in the date. |
[Table 8. Parameters]

{#GlideDate-getDisplayValueEx_S__table_tg4_ckc_b3c} {#GlideDate-getDisplayValueEx_S__table_ug4_ckc_b3c__entry__2}

| Type | Description |
|-|-|
| String | The date in the specified format. |
[Table 9. Returns]

{#GlideDate-getDisplayValueEx_S__table_ug4_ckc_b3c}  
This example returns the date using the current user's timezone and each formatting option.

    var gd = new GlideDate();
    gs.info(gd.getDisplayValueEx("short"));
    gs.info(gd.getDisplayValueEx("medium"));
    gs.info(gd.getDisplayValueEx("long"));
    gs.info(gd.getDisplayValueEx("full"));

Output:

    1/27/26  //short
    Jan 27, 2026  //medium
    January 27, 2026  //long
    Tuesday, January 27, 2026  //full

### Scoped equivalent {#GlideDate-getDisplayValueEx_S__section_w2m_sxr_mcb}

To use this method in a scoped application, use the corresponding scoped method: [Scoped GlideDate - getDisplayValueEx(String style)](https://servicenow-prod.fluidtopics.net/Yhbx~AEA0DN5MC6rZ2Uv0Q#SGlideDate-getDisplayValueEx_S "Returns the date using the current user's timezone and a specified format.").

## GlideDate - getDisplayValueInternal() {#ariaid-title7}

Gets the date in the internal format (yyyy-MM-dd) and current user's timezone.
See also [getDisplayValue()](https://servicenow-prod.fluidtopics.net/IssYjxmD__FBe5_AVLFoVg#GlideDate-getDisplayValue "Gets the date and time field value in the UTC time zone.")
{#GlideDate-getDisplayValueInternal__table_vy2_535_jq__entry__3}

| Name | Type | Description |
|-|-|-|
| none |   |   |
[Table 10. Parameters]

{#GlideDate-getDisplayValueInternal__table_vy2_535_jq} {#GlideDate-getDisplayValueInternal__table_qpt_3f5_jq__entry__2}

| Type | Description |
|-|-|
| String | Date value for the GlideDate object in the current user's time zone. Format: yyyy-MM-dd |
[Table 11. Returns]

{#GlideDate-getDisplayValueInternal__table_qpt_3f5_jq}  

    var gd = new GlideDate(); 
    gs.info(gd.getDisplayValueInternal());

Output:

    2021-04-21

### Scoped equivalent {#GlideDate-getDisplayValueInternal__section_w2m_sxr_mcb}

To use this method in a scoped application, use the corresponding scoped method: [Scoped GlideDate -
getDisplayValueInternal()](https://servicenow-prod.fluidtopics.net/Yhbx~AEA0DN5MC6rZ2Uv0Q#r_ScopedGlideDateGetDisplayValueInternal "Gets the date in the internal format (yyyy-MM-dd) and current user's timezone.").

## GlideDate - getDisplayValueLang(String style) {#ariaid-title8}

Returns the date value in the user's locale according to a specified date
style.
{#GlideDate-getDisplayValueLang_S__id_bvt_cvr_dwb__entry__3}

| Name | Type | Description |
|-|-|-|
| style | String | Date format. Valid values: * full: returns the date in the format of \<weekday, month, day, and year\> according to the user's locale (for example, Monday, October 24, 2022). * long: returns the date in the format of \<month, day, and year\> according to the user's locale (for example, October 24, 2022). * medium: similar to long but returns the date with an abbreviated month (for example, Oct 24, 2022). * short: returns the date in the format of MM/DD/YY or DD/MM/YY according to the user's locale (for example, 10/24/2022 or 24/10/2022). If any other value is passed the API defaults to `medium`. Accepted values are not case sensitive. |
[Table 12. Parameters]

{#GlideDate-getDisplayValueLang_S__id_bvt_cvr_dwb} {#GlideDate-getDisplayValueLang_S__id_a5b_gvr_dwb__entry__2}

| Type | Description |
|-|-|
| String | A string representation of the date in the style specified and in the appropriate format for the locale of the current user. |
[Table 13. Returns]

{#GlideDate-getDisplayValueLang_S__id_a5b_gvr_dwb}  
The following example returns the date of the user's locale in all styles.

    var gd = new GlideDate(); // This will fetch the current date


    gs.info('date: ' + gd.getDisplayValue());

    gs.info('date: ' + gd.getDisplayValueLang("full"));
    gs.info('date: ' + gd.getDisplayValueLang("long"));
    gs.info('date: ' + gd.getDisplayValueLang("medium"));
    gs.info('date: ' + gd.getDisplayValueLang("short"));

Output:

    date: 2023-01-18
    Wednesday, January 18, 2023
    date: January 18, 2023
    date: Jan 18, 2023
    date: 1/18/23

## GlideDate - getDisplayValueLang(String style, String language) {#ariaid-title9}

Returns the date value in the user's locale and language according to a specified date
style.
{#GlideDate-getDisplayValueLang_S_S__id_ox5_fwr_dwb__entry__3}

| Name | Type | Description |
|-|-|-|
| style | String | Date format. Valid values: * full: returns the date in the format of \<weekday, month, day, and year\> according to the user's locale (for example, Monday, October 24, 2022). * long: returns the date in the format of \<month, day, and year\> according to the user's locale (for example, October 24, 2022). * medium: similar to long but returns the date with an abbreviated month (for example, Oct 24, 2022). * short: returns the date in the format of MM/DD/YY or DD/MM/YY according to the user's locale (for example, 10/24/2022 or 24/10/2022). If any other value is passed the API defaults to `medium`. Accepted values are not case sensitive. |
| language | String | Returns the date according to a specified language value. Accepts language tags that conform with the BCP-47 standard. For example, `fr` for French or `en-UK` for British English. For a full list of accepted values, see [BCP 47 Language Code List](https://appmakers.dev/bcp-47-language-codes-list/). |
[Table 14. Parameters]

{#GlideDate-getDisplayValueLang_S_S__id_ox5_fwr_dwb} {#GlideDate-getDisplayValueLang_S_S__id_zty_3wr_dwb__entry__2}

| Type | Description |
|-|-|
| String | Date in the style and language specified according to the locale of the current user. |
[Table 15. Returns]

{#GlideDate-getDisplayValueLang_S_S__id_zty_3wr_dwb}  
The following example returns the date of the user's locale in various languages and
styles.

    var gd = new GlideDate(); // This will fetch the current date


    gs.info('date: ' + gd.getDisplayValue());

    gs.info('date: ' + gd.getDisplayValueLang("full", "fr"));
    gs.info('date: ' + gd.getDisplayValueLang("long", "en-GB"));
    gs.info('date: ' + gd.getDisplayValueLang("medium", "de"));
    gs.info('date: ' + gd.getDisplayValueLang("short", "es-MX"));

Output:


    date: 2023-01-18
    date: mercredi 18 janvier 2023
    date: 18 January 2023
    date: 18.01.2023
    date: 18/01/23

## GlideDate - getMonthNoTZ() {#ariaid-title10}

Gets the month stored by the GlideDate object, expressed in the UTC time zone.
{#GlideDate-getMonthNoTZ__table_az1_3wq_yv__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 16. Parameters]

{#GlideDate-getMonthNoTZ__table_az1_3wq_yv} {#GlideDate-getMonthNoTZ__table_bz1_3wq_yv__entry__2}

| Type | Description |
|-|-|
| Number | The numerical value of the month from 1 to 12. |
[Table 17. Returns]

{#GlideDate-getMonthNoTZ__table_bz1_3wq_yv}  

    //Today's date is 2016-05-13
    var gd =new GlideDate();
    gs.info(gd.getMonthNoTZ());

Output:

    5

### Scoped equivalent {#GlideDate-getMonthNoTZ__section_w2m_sxr_mcb}

To use this method in a scoped application, use the corresponding scoped method: [Scoped GlideDate -
getMonthNoTZ()](https://servicenow-prod.fluidtopics.net/Yhbx~AEA0DN5MC6rZ2Uv0Q#r_SGD-getMonthNoTZ "Gets the month stored by the GlideDate object, expressed in the UTC time zone.").

## GlideDate - getYearNoTZ() {#ariaid-title11}

Gets the year stored by the GlideDate object, expressed in the UTC time zone.
{#GlideDate-getYearNoTZ__table_pnp_hxq_yv__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 18. Parameters]

{#GlideDate-getYearNoTZ__table_pnp_hxq_yv} {#GlideDate-getYearNoTZ__table_qnp_hxq_yv__entry__2}

| Type | Description |
|-|-|
| Number | The numerical value of the year. |
[Table 19. Returns]

{#GlideDate-getYearNoTZ__table_qnp_hxq_yv}  

    //Today's date is 2016-05-13
    var gd =new GlideDate();
    gs.info(gd.getYearNoTZ());

Output:

    2016

### Scoped equivalent {#GlideDate-getYearNoTZ__section_w2m_sxr_mcb}

To use this method in a scoped application, use the corresponding scoped method: [Scoped GlideDate -
getYearNoTZ()](https://servicenow-prod.fluidtopics.net/Yhbx~AEA0DN5MC6rZ2Uv0Q#r_SGD-getYearNoTZ "Gets the year stored by the GlideDate object, expressed in the UTC time zone.").

## GlideDate - parseDate(String date, String language, String country) {#ariaid-title12}

Parses a date to the locale associated with the passed language and country codes.
Note:  
This method fails and throws an exception if the regional date format isn't followed.
{#GlideDate-parseDate_S_S_S__table_ynx_dsb_fbc__entry__3}

| Name | Type | Description |
|-|-|-|
| date | String | Date formatted in regional syntax. Formats: * Alphanumeric dates: You can specify months as either three characters such as Jan, Feb, or Mar, or fully spell out the month's name. Years must be four digits and days must be two digits. For example: `"31 Jan 2020"` or `"31 January 2020"` * Numeric dates: Days and months must be two digits. Four digits are highly preferred for years, though the method does support a two-digit year with less accuracy and a higher chance of parse failure. You must also use the regional date separator. These separators affect the parse based on the passed in language and country values. For example: "12/31/2020" for US locale and "31.12.20" for Estonia locale. |
| language | String | ISO-639 two-character language code. |
| country | String | ISO-3166 two-character country code. |
[Table 20. Parameters]

{#GlideDate-parseDate_S_S_S__table_ynx_dsb_fbc} {#GlideDate-parseDate_S_S_S__table_znx_dsb_fbc__entry__2}

| Type | Description |
|-|-|
| Object | Parsed GlideDate object that you can use in calculations or insert in a record. This method throws an exception if the date failed to parse. An exception happens when the date format doesn't match the specified locale format (passed language and country parameters). |
[Table 21. Returns]

{#GlideDate-parseDate_S_S_S__table_znx_dsb_fbc}  
The following code example parses a date and adds four weeks to that date.

    var date = GlideDate.parseDate("31 Dec 2020", "en", "GB");
    date.addWeeksLocalTime(4);
    gs.info("Project is due 4 weeks after start date, on " + date.getDisplayValue());

Output:

    Project is due 4 weeks after start date, on 2021-01-28

## GlideDate - setDisplayValue(String asDisplayed) {#ariaid-title13}

Sets a date value using the current user's display format and time zone.
{#GlideDate-setDisplayValue_S__table_vy2_525_jq__entry__3}

| Name | Type | Description |
|-|-|-|
| asDisplayed | String | Date in the current user's display format and time zone. Format: Must be formatted using the current user's preferred display format, such as yyyy-MM-dd. |
[Table 22. Parameters]

{#GlideDate-setDisplayValue_S__table_vy2_525_jq} {#GlideDate-setDisplayValue_S__table_qpt_3f5_jq1__entry__2}

| Type | Description |
|-|-|
| None |   |
[Table 23. Returns]

{#GlideDate-setDisplayValue_S__table_qpt_3f5_jq1}  

    var gd = new GlideDate();
    gd.setDisplayValue("2011-01-01");
    gs.info(gd.getValue());

Output:

    2011-01-01

### Scoped equivalent {#GlideDate-setDisplayValue_S__section_w2m_sxr_mcb}

To use this method in a scoped application, use the corresponding scoped method: [Scoped GlideDate -
setDisplayValue(String asDisplayed)](https://servicenow-prod.fluidtopics.net/Yhbx~AEA0DN5MC6rZ2Uv0Q#r_ScopedGlideDateSetDisplayValue_String "Sets a date value using the current user's display format and time zone.").

## GlideDate - setDisplayValueEx(String date, String style) {#ariaid-title14}

Sets the date using a specified format.
{#GlideDate-setDisplayValueEx_S_S__table_zb5_3kc_b3c__entry__3}

| Name | Type | Description |
|-|-|-|
| date | String | Value to set for the date. The [getDisplayValueEx()](https://servicenow-prod.fluidtopics.net/IssYjxmD__FBe5_AVLFoVg#GlideDate-getDisplayValueEx_S "Returns the date using the current user's timezone and a specified format.") method returns dates in a valid format, or dates can be formatted as shown below. * M/D/YY or D/M/YY depending on the current user's language. For example, 1/27/26 or 27/1/26. * Abbreviated month, day, and year. For example, Jan 27, 2026. * Month, day, and year. For example, January 27, 2026. * Day of the week, month, day, and year. For example, Tuesday, January 27, 2026. {#GlideDate-setDisplayValueEx_S_S__ul_ayn_24g_b3c}The current user's language determines the accepted order of month and day in the date. For example, if the current user's language is English `3/21/26` and `March 21, 2026` are valid values while `21/3/26` and `21 March, 2026` are not. |
| style | String | Format to use for the date. You must use the same format as the provided date value. Valid values (case insensitive): * `short`: M/D/YY or D/M/YY depending on the current user's language. For example, 1/27/26 or 27/1/26. * `medium`: Abbreviated month, day, and year. For example, Jan 27, 2026. * `long`: Month, day, and year. For example, January 27, 2026. * `full`: Day of the week, month, day, and year. For example, Tuesday, January 27, 2026. {#GlideDate-setDisplayValueEx_S_S__ul_ayn_24g_b3d} |
[Table 24. Parameters]

{#GlideDate-setDisplayValueEx_S_S__table_zb5_3kc_b3c} {#GlideDate-setDisplayValueEx_S_S__table_ac5_3kc_b3c__entry__2}

| Type | Description |
|-|-|
| None |   |
[Table 25. Returns]

{#GlideDate-setDisplayValueEx_S_S__table_ac5_3kc_b3c}  
This example sets the date using a specified format.

    gd = new GlideDate();
    gd.setDisplayValueEx("Jan 28, 2026", "medium");
    gs.info(gd.getDisplayValueEx("full"));

Output:

    Wednesday, January 28, 2026

### Scoped equivalent {#GlideDate-setDisplayValueEx_S_S__section_w2m_sxr_mcb}

To use this method in a scoped application, use the corresponding scoped method: [Scoped GlideDate - setDisplayValueEx(String date, String style)](https://servicenow-prod.fluidtopics.net/Yhbx~AEA0DN5MC6rZ2Uv0Q#SGlideDate-setDisplayValueEx_S_S "Sets the date using a specified format.").

## GlideDate - setDisplayValueLang(String date, String style) {#ariaid-title15}

Sets a date using a specified style and format according to the current user's
locale.
{#GlideDate-setDisplayValueLang_S_S__id_hyd_vwr_dwb__entry__3}

| Name | Type | Description |
|-|-|-|
| date | String | Date value for the GlideDate object in the current user's time zone. Valid values are any date and time output from the getDisplayValueLang() function. For instance, using output from the getDisplayValueLang(String style, String language) example earlier in this topic, October 25, 2022 or 25.10.2022 are accepted values. |
| style | String | Date format. Valid values: * full: returns the date in the format of \<weekday, month, day, and year\> according to the user's locale (for example, Monday, October 24, 2022). * long: returns the date in the format of \<month, day, and year\> according to the user's locale (for example, October 24, 2022). * medium: similar to long but returns the date with an abbreviated month (for example, Oct 24, 2022). * short: returns the date in the format of MM/DD/YY or DD/MM/YY according to the user's locale (for example, 10/24/2022 or 24/10/2022). If any other value is passed the API defaults to `medium`. Accepted values are not case sensitive. |
[Table 26. Parameters]

{#GlideDate-setDisplayValueLang_S_S__id_hyd_vwr_dwb} {#GlideDate-setDisplayValueLang_S_S__id_bmq_vwr_dwb__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 27. Returns]

{#GlideDate-setDisplayValueLang_S_S__id_bmq_vwr_dwb}  
The following example shows how you can set the current date of the user's locale to 'full'
style using setDisplayValueLang().

    glideDate.setDisplayValueLang("2/3/2023", "short");


    gs.info('date: ' + glideDate.getDisplayValue());
    gs.info('date: ' + glideDate.getDisplayValueLang("full"));

Output:

    date: 2023-02-03
    date: Friday, February 3, 2023

## GlideDate - setDisplayValueLang(String date, String style, String language) {#ariaid-title16}

Sets a date using a specified style, language, and format according to the current
user's locale.
{#GlideDate-setDisplayValueLang_S_S_S__id_udx_nxr_dwb__entry__3}

| Name | Type | Description |
|-|-|-|
| date | String | Date value for the GlideDate object in the current user's time zone. Valid values are any date and time output from the getDisplayValueLang() function. For instance, using output from the getDisplayValueLang(String style, String language) example earlier in this topic, October 25, 2022 or 25.10.2022 are accepted values. |
| style | String | Date format. Valid values: * full: returns the date in the format of \<weekday, month, day, and year\> according to the user's locale (for example, Monday, October 24, 2022). * long: returns the date in the format of \<month, day, and year\> according to the user's locale (for example, October 24, 2022). * medium: similar to long but returns the date with an abbreviated month (for example, Oct 24, 2022). * short: returns the date in the format of MM/DD/YY or DD/MM/YY according to the user's locale (for example, 10/24/2022 or 24/10/2022). If any other value is passed the API defaults to `medium`. Accepted values are not case sensitive. |
| language | String | Sets the language using a language tag that conforms with the BCP-47 standard. For example, `fr` for French or `en-UK` for British English. For a full list of accepted values, see [BCP 47 Language Code List](https://appmakers.dev/bcp-47-language-codes-list/). |
[Table 28. Parameters]

{#GlideDate-setDisplayValueLang_S_S_S__id_udx_nxr_dwb} {#GlideDate-setDisplayValueLang_S_S_S__id_nbl_4xr_dwb__entry__2}

| Type | Description |
|-|-|
| Void |   |
[Table 29. Returns]

{#GlideDate-setDisplayValueLang_S_S_S__id_nbl_4xr_dwb}  
The following example returns the date and time in short and full styles for English and
French.

    var glideDateFR = new GlideDate(); 

    glideDateUS.setDisplayValueLang("2/3/202", "short", "en-US" );
    glideDateFR.setDisplayValueLang("2/3/2023", "short", "fr-FR" );

    gs.info('en-US date: ' + glideDateUS.getDisplayValue());
    gs.info('en-US date: ' + glideDateUS.getDisplayValueLang("full"));

    gs.info('fr-FR date: ' + glideDateFR.getDisplayValue());
    gs.info('fr-FR date: ' + glideDateFR.getDisplayValueLang("full"));

Output:

    en-US date: 2023-02-03
    en-US date: Friday, February 3, 2023
    fr-FR date: 2023-03-02
    fr-FR date: Thursday, March 2, 2023

## GlideDate - setValue(String o) {#ariaid-title17}

Sets the date of the current GlideDate object in internal format (yyyy-MM-dd) and the
system time zone (UTC by default).
{#GlideDate-setValue_S__table_vy2_525_jq__entry__3}

| Name | Type | Description |
|-|-|-|
| o | String | Date and time to set in the current GlideDate object. Format: yyyy-MM-dd |
[Table 30. Parameters]

{#GlideDate-setValue_S__table_vy2_525_jq} {#GlideDate-setValue_S__table_qpt_3f5_jq1__entry__2}

| Type | Description |
|-|-|
| None |   |
[Table 31. Returns]

{#GlideDate-setValue_S__table_qpt_3f5_jq1}  

    var gd = new GlideDate(); 
    gd.setValue('2015-01-01');
    gs.info(gd.getValue());

Output:

    2015-01-01

### Scoped equivalent {#GlideDate-setValue_S__section_w2m_sxr_mcb}

To use this method in a scoped application, use the corresponding scoped method: [Scoped GlideDate - setValue(String
o)](https://servicenow-prod.fluidtopics.net/Yhbx~AEA0DN5MC6rZ2Uv0Q#r_ScopedGlideDateSetValue_String "Sets the date of the current GlideDate object in internal format (yyyy-MM-dd) and the system time zone (UTC by default).").

