-3

I am working with an API that requires a certain type of Date format. The date example I am being provided is 10/1/2020 and it converts to 1601528400000. I have never used this type of date before and completely puzzled on what it could be. Does anyone know what type of date format this is?

Example of the URL: https://www.test.org/exports?s_id=-100&g_id=-100&c_id=-100&start_date=1601528400000&end_date=1602478800000

Steve Wolfe
  • 71
  • 1
  • 1
  • 10
  • 1
    That's a unix time stamp. https://www.unixtimestamp.com/ – tnw Oct 12 '20 at 14:11
  • There is [DateTime constructor](https://learn.microsoft.com/en-us/dotnet/api/system.datetime.-ctor?#System_DateTime__ctor_System_Int64_) which accept long. – Sinatr Oct 12 '20 at 14:14
  • There's [DateTimeOffset.ToUnixTimeSeconds Method](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tounixtimeseconds?view=netcore-3.1) and [DateTimeOffset.ToUnixTimeMilliseconds Method](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tounixtimemilliseconds?view=netcore-3.1) – Fildor Oct 12 '20 at 14:14
  • 1
    @Sinatr Doesn't look like ticks, though. Unix Timestamp seems reasonable. – Fildor Oct 12 '20 at 14:17

1 Answers1

-2

https://currentmillis.com/

DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()

leoleo
  • 1