d365stuff-chat / posts /systemdatetime.md
mafzaal's picture
Sure! Pl
9ed2c7f
---
title: System.DateTime
date: 2019-10-01T00:00:00.000Z
lastmod: 2019-09-30T23:59:59.000Z
description: There are enough x++ date and time functions to do just about anything, but
sometimes they can make simple tasks fussy, and lack precision.  I was
investigating how to bring in [at least] milliseconds into my my timestamps, and
ran across the DateTime struct
[https://docs.microsoft.com/en-us/dotnet/api/system.datetime?view=netframework-4.8]
and its methods
[https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/linq/system-datetime-methods]
.
Not only does it make a lot of date comp
tags: x++, AX, D365
author: Michael Stashwick
author_url: https://www.d365stuff.co/author/michael/
publisher: D365 Stuff
publisher_url: https://www.d365stuff.co/
---
30 September 2019 / [x++](/tag/x/)
# System.DateTime
There are enough x++ date and time functions to do just about anything, but
sometimes they can make simple tasks fussy, and lack precision. I was
investigating how to bring in [at least] milliseconds into my my timestamps,
and ran across the DateTime [struct](https://docs.microsoft.com/en-
us/dotnet/api/system.datetime?view=netframework-4.8&ref=d365stuff.co) and its
[methods](https://docs.microsoft.com/en-
us/dotnet/framework/data/adonet/sql/linq/system-datetime-
methods?ref=d365stuff.co).
Not only does it make a lot of date components easily accessible, but it has
the day of year, millisecond, and tick measures of time. It's the little
things.
![](https://www.d365stuff.co/content/images/2019/09/image.png)
![Michael Stashwick](/content/images/size/w100/2019/07/FacePic.jpg)
#### [Michael Stashwick](/author/michael/)
Read [more posts](/author/michael/) by this author.
[Read More](/author/michael/)