DateTime.Today
DateTime.Today pulls the current date without time. The time portion will be set to midnight (00:00:00).
Applies To
Properties and Methods
Properties
- .Day
- .DaylightSavings
- .DayOfWeek
- .DayOfYear
- .Hour
- .ISOString
- .LongDateString
- .LongTimeString
- .Minute
- .Month
- .Second
- .ShortDateString
- .ShortTimeString
- .Year
Methods
- .AddDays(Days)
- .AddHours(Hours)
- .AddMinutes(Minutes)
- .AddMonths(Months)
- .AddSeconds(Seconds)
- .AddYears(Years)
- .Compare(To)
- .Copy()
- .StringDayOfWeek([Culture])
- .StringMonth([Culture])
Available
The .Today property is available in:
- 15.03.016
- All newer builds
Type
DateTime
Syntax
DateTime.Today;
Parameters
None
Example
var ldDateTime = DateTime.Today;
Event.Form.MessageBox('ldDateTime: ' + ldDateTime.ShortDateString + ' ' + Utility.FormatTime(ldDateTime, true));
/* Expected Prompt response:
ldDateTime: 10/22/2021 12:00:00am
*/
.Today will only pull the date