d365stuff-chat / posts /systemdatetime.md
mafzaal's picture
Sure! Pl
9ed2c7f

30 September 2019 / 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.

Michael Stashwick

Michael Stashwick

Read more posts by this author.

Read More