# Date time format query

**URL:** <https://forums.powershell.org/t/date-time-format-query/21326>\
**Category:** PowerShell Help\
**Created:** [January 9, 2023, 11:50pm UTC](https://forums.powershell.org/t/date-time-format-query/21326 "2023-01-09T23:50:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GurdipS5](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/gurdips5/32/2343_2.png) [@GurdipS5](https://forums.powershell.org/u/GurdipS5)\
**Post date:** [January 9, 2023, 11:50pm UTC](https://forums.powershell.org/t/date-time-format-query/21326/1 "2023-01-09T23:50:34Z")

</div>

Hi,  
I am calling a REST API and need to pass in a date-time like this format:

2023-02-27T14:15:22Z

Does anyone know what this format is called and how to create a format like this in Powershell?

Many thanks!

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [January 10, 2023, 12:51am UTC](https://forums.powershell.org/t/date-time-format-query/21326/2 "2023-01-10T00:51:19Z")

</div>

Did you try to search for it? I did and found this:

> **[Standard date and time format strings](https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings)**
>
> Learn how to use a standard date and time format string to define the text representation of a date and time value in .NET.

and this:

> **[PowerTip: Create a Sortable Date with PowerShell](https://devblogs.microsoft.com/scripting/powertip-create-a-sortable-date-with-powershell/)**
>
> Summary: Use Windows PowerShell to easily create a sortable date.  How can I use Windows PowerShell to create an ISO 8601 standard sortable date time-stamp for my logging solution?  Use the Sortable Format Specifier in...

and this:

> **[Get-Date (Microsoft.PowerShell.Utility) - PowerShell](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-date?view=powershell-7.3)**
>
> The Get-Date cmdlet gets a DateTime object that represents the current date or a date that you specify. Get-Date can format the date and time in several .NET and UNIX formats. You can use Get-Date to generate a date or time character string, and then...

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:16pm UTC](https://forums.powershell.org/t/date-time-format-query/21326/3 "2024-05-16T20:16:08Z")

</div>

Closed on May 16, 2024, 8:16pm UTC


