DateTimeUtil component
Use the DateTimeUtil component to manipulate an instant in time, typically expressed as a date and time of day. For more information about the properties and main methods exposed in the DateTimeUtil, see the documentation for DateTime members in the Microsoft .NET Framework Development Center. You can access it at http://msdn2.microsoft.com/en-us/library/system.datetime_members.aspx. In addition to the methods listed on the MSDN website, the DateTimeUtil has these methods:
Methods
Method |
Description |
Parameters |
Result type |
Date (1 param) |
Gets the date component of this instance. |
DateTime Value |
DateTime |
Date (2 params) |
Compares the DateTime values of two input parameters and returns True if the values are equal. |
DateTime Value1, DateTime Value2 |
Boolean |
Day |
Gets the day of the month for the input value. |
DateTime Value |
Int32 |
DayOfWeek |
Gets the day of the week for the input value. |
DateTime Value |
Int32 |
DayOfYear |
Gets the day of the year for the input value. |
DateTime Value |
Int32 |
Hour |
Gets the hour component of the date for the input value. |
DateTime Value |
Int32 |
Millisecond |
Gets the milliseconds component of the date for the input value. |
DateTime Value |
Int32 |
Minute |
Gets the minute component of the date for the input value. |
DateTime Value |
Int32 |
Month |
Gets the month component of the date for the input value. |
DateTime Value |
Int32 |
Now |
Gets a DateTime object that is set to the current date and time on this computer, expressed as the local time. |
None |
DateTime |
ParseExact (19.1.22 or later) |
Converts dates that are in a string format and are formatted for another culture into a DateTime. For example, you can convert a date in dd-mm-yyyy format to a DateTime by specifying the format parameter. This method converts the specified string representation of a date and time to its DateTime equivalent using the format and culture, or locale, information that you specify. The format of the string representation must match the specified format exactly. You can define the culture parameter by selecting the locale from a list or entering it, such as en_us for US English or fr_ca for Canadian French. |
input, format, culture |
DateTime |
Second |
Gets the seconds component of the date for the input value. |
DateTime Value |
Int32 |
Ticks |
Gets the number of ticks that represent the date and time for the input value. |
DateTime Value |
Int64 |
TimeOfDay |
Gets the time of day for the input value. |
DateTime Value |
TimeSpan |
Today |
Gets the current date. |
None |
DateTime |
UtcNow |
Gets a DateTime object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC). |
None |
DateTime |
Year |
Gets the year component of the date for the input value. |
DateTime Value |
Int32 |
Related information
Using the DateTimeUtil Component
Privacy | Trademarks | Terms of Use | Feedback
Updated: 01 July 2024
© 2016 - 2024 Pegasystems Inc. Cambridge, MA All rights reserved.