Function returning the zero-based day of week

Hello!

I am wondering if there is

  1. a function returining the zero-based day of week. It should be an integer, sunday being 0 and and saturday 6.
  2. a function returning the month number of the specified time.
  3. a function returning the day of month (1 - 31) of the specified date.

I was expecting to have something like
int TimeDayOfWeek( datetime date ); for (1)
int TimeMonth(datetime date) for (2) and
int TimeDay(datetime date ) for (3),

but I unfortunately do not find anything like that in the documention.

I would appreciate any help!

What you’re looking for aren’t NinjaTrader specific so you aren’t going to find it in NT documentation. Look online for C# documentation.

For your Q1:

Q2:

Q3:

Hope this helps.

Many thanks fc77 for your help!