Home Explore Blog CI



nushell

lang-guide/chapters/types/basic_types/datetime.md
d40ad0091c92eb357ee3872eb1acc67ea9260c5fd4b194fc0000000300000566
# Datetime

<!-- prettier-ignore -->
|     |     |
| --- | --- |
| **_Description:_**    | Represents a specific point in time using international standard date time descriptors 
| **_Annotation:_**     | `datetime`                                                                                 
| **_Literal syntax:_** | RFC 3339                                                                               
|                       | Date-only: `2022-02-02`                                                                
|                       | Date and time (GMT): `2022-02-02T14:30:00`                                             
|                       | Date and time including timezone offset: `2022-02-02T14:30:00+05:00`                   
| **_Casts:_**          | [`into datetime`](/commands/docs/into_datetime.md)                                     
| **_See also:_**       | [Types of Data - Dates](/book/types_of_data.md#dates)

## Additional language notes

- Dates and times are held together in the `datetime` type. Date values used by the system are timezone-aware. By default, dates use the UTC timezone.

## Common commands that can be used with `datetime`

Many of Nushell's builtin commands are datetime aware and output or use `datetime` values
for fields and expressions. For example:

- `date` and its subcommands
- `format date`
- `ls`
- `ps`
- `sys`

Chunks
4ba7f45b (1st chunk of `lang-guide/chapters/types/basic_types/datetime.md`)
Title: Datetime Type in Nushell
Summary
This section describes the `datetime` type in Nushell, which represents a specific point in time using RFC 3339. It covers the annotation, literal syntax (date-only, date and time in GMT, and date and time with timezone offset), and casting using `into datetime`. Dates are timezone-aware, using UTC by default. The section also lists common commands that utilize `datetime` values, such as `date`, `format date`, `ls`, `ps`, and `sys`.