karlwancl / YahooFinanceApi

A handy Yahoo! Finance api wrapper, based on .NET Standard 2.0

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dividend Date

IvanDuhov opened this issue · comments

Hello guys,

What exactly the Dividend Date should return?

When I get the Dividend Date for MSFT, it returns this: "1591833600".

Thanks for your great work,

Looking forward to answering from you

DividendDate is a Unix timestamp which is the number of seconds elapsed minus leap seconds since 1 January 1970.

The static DateTimeOffset.FromUnixTimeSeconds method converts DividendDate to DateTime format.

Here is an example:
Console.WriteLine($"Dividend Date: {DateTimeOffset.FromUnixTimeSeconds(msft[Field.DividendDate])}");