FixedTimeStampMethods class | QSYS API Reference Guide
Estimated reading time: 17 minutes
Contains extension methods for handling RPG operations for FixedTimestamp values.
Namespace: ASNA.QSys.Runtime
Assembly: ASNA.QSys.Runtime.dll
Inheritance: Object
Methods
Signature |
Description |
AddDuration<TSeparator>(FixedTimestamp<TSeparator>, Double, DurationCode) |
Adds a duration span to a FixedTime value. |
MergeDate<TSeparator>(FixedTimestamp<TSeparator>, DateTime) |
Merges a date into the date part of a timestamp. |
MergeTime<TSeparator>(FixedTimestamp<TSeparator>, DateTime) |
Merges a time into the time part of a timestamp. |
MoveLeft<TSeparator>(FixedTimestamp<TSeparator>, Int16) |
RPG’s MOVEL. Moves left a datetime into a int2 (short). |
MoveLeft<TSeparator>(FixedTimestamp<TSeparator>, Int16) |
RPG’s MOVEL. Moves left a datetime into a int4 (int). |
MoveLeft<TSeparator>(FixedTimestamp<TSeparator>, Int16) |
RPG’s MOVEL. Moves left a datetime into a int8 (long). |
MoveLeftToChar<TSeparator>(FixedTimestamp<TSeparator>) |
RPG’s MOVEL. Moves left a date, time, timestamp in the given format to a char value. |
MoveLeftWithPad<TSeparator>(FixedTimestamp<TSeparator>, Int16) |
RPG’s MOVE. Moves right a datetime into a int2 (short) with pad. |
MoveLeftWithPad<TSeparator>(FixedTimestamp<TSeparator>, Int16) |
RPG’s MOVEL. Moves left a datetime into a int4 (int). |
MoveLeftWithPad<TSeparator>(FixedTimestamp<TSeparator>, Int16) |
RPG’s MOVEL. Moves left a datetime into a int8 (long). |
MoveRight<TSeparator>(FixedTimestamp<TSeparator>, Int16) |
RPG’s MOVE. Moves right a datetime into a int2 (short). |
MoveRight<TSeparator>(FixedTimestamp<TSeparator>, Int16) |
RPG’s MOVE. Moves right a datetime into a int4 (int). |
MoveRight<TSeparator>(FixedTimestamp<TSeparator>, Int16) |
RPG’s MOVE. Moves right a datetime into a int8 (long). |
MoveRightToChar<TSeparator>(FixedTimestamp<TSeparator>) |
RPG’s MOVE. Moves right a date, time, timestamp in the given format to a char value. |
MoveRightWithPad<TSeparator>(FixedTimestamp<TSeparator>, Int16) |
RPG’s MOVE. Moves right a datetime into a int2 (short) with pad. |
MoveRightWithPad<TSeparator>(FixedTimestamp<TSeparator>, Int16) |
RPG’s MOVE. Moves right a datetime into a int4 (int) with pad. |
MoveRightWithPad<TSeparator>(FixedTimestamp<TSeparator>, Int16) |
RPG’s MOVE. Moves right a datetime into a int8 (long) with pad. |
SubtractDuration<TSeparator>(FixedTimestamp<TSeparator>, Double, DurationCode) |
Subtracts a duration span from a date or a timestamp value. |
TimestampToDate<TSeparator>(FixedTimestamp<TSeparator>) |
Returns the Date portion of a timestamp. |
TimestampToTime<TSeparator>(FixedTimestamp<TSeparator>) |
Returns the hours, minutes, and seconds of a timestamp. |
TimestampToUSATime<TSeparator>(FixedTimestamp<TSeparator>) |
Returns the hours and minutes of a timestamp. |
ToDouble<TSeparator>(FixedTimestamp<TSeparator>, Boolean) |
Converts a timestamp value to double. |
ToFixedDecimal<TSeparator>(FixedTimestamp<TSeparator>, Int32, Int32) |
Converts a timestamp to a decimal. |
ToFloat<TSeparator>(FixedTimestamp<TSeparator>, Boolean) |
Converts a timestamp value to float. |
ToInt16<TSeparator>(FixedTimestamp<TSeparator>, Boolean) |
Converts a timestamp type to int 16. |
ToInt32<TSeparator>(FixedTimestamp<TSeparator>, Boolean) |
Converts a timestamp type to int 32. |
ToInt64<TSeparator>(FixedTimestamp<TSeparator>, Boolean) |
Converts a timestamp type to int 64. |
Adds a duration span to a FixedTime value.
DateTime AddDuration<TSeparator>(FixedTimestamp<TSeparator> timestamp, double duration, DurationCode durationCode)
Parameters
Type |
Parameter name |
Description |
FixedTimestamp<TSeparator> |
timestamp |
.NET FixedTime value specifying a FixedTime value. |
Double |
duration |
A double value representing duration. |
DurationCode |
durationCode |
Code determining what duration represents. |
Returns
Type |
Description |
DateTime |
The resulting DateTime value after adding to it the given duration. |
Merges a date into the date part of a timestamp.
DateTime MergeDate<TSeparator>(FixedTimestamp<TSeparator> timestamp, DateTime date)
Parameters
Returns
Type |
Description |
DateTime |
.NET DateTime value. |
Merges a time into the time part of a timestamp.
DateTime MergeTime<TSeparator>(FixedTimestamp<TSeparator> timestamp, DateTime time)
Parameters
Returns
Type |
Description |
DateTime |
.NET DateTime value. |
RPG’s MOVEL. Moves left a datetime into a int2 (short).
short MoveLeft<TSeparator>(FixedTimestamp<TSeparator> timestamp, short targetOperand)
Parameters
Returns
Type |
Description |
Int16 |
The resulting short value of the operation. |
RPG’s MOVEL. Moves left a datetime into a int4 (int).
short MoveLeft<TSeparator>(FixedTimestamp<TSeparator> timestamp, short targetOperand)
Parameters
Returns
Type |
Description |
Int16 |
The resulting int value of the operation. |
RPG’s MOVEL. Moves left a datetime into a int8 (long).
short MoveLeft<TSeparator>(FixedTimestamp<TSeparator> timestamp, short targetOperand)
Parameters
Returns
Type |
Description |
Int16 |
The resulting long value of the operation. |
RPG’s MOVEL. Moves left a date, time, timestamp in the given format to a char value.
char MoveLeftToChar<TSeparator>(FixedTimestamp<TSeparator> timestamp)
Parameters
Returns
Type |
Description |
Char |
The leftmost character of the string representation of timestamp. |
RPG’s MOVE. Moves right a datetime into a int2 (short) with pad.
short MoveLeftWithPad<TSeparator>(FixedTimestamp<TSeparator> timestamp, short targetOperand)
Parameters
Returns
Type |
Description |
Int16 |
The resulting short value of the operation. |
RPG’s MOVEL. Moves left a datetime into a int4 (int).
short MoveLeftWithPad<TSeparator>(FixedTimestamp<TSeparator> timestamp, short targetOperand)
Parameters
Returns
Type |
Description |
Int16 |
The resulting int value of the operation. |
RPG’s MOVEL. Moves left a datetime into a int8 (long).
short MoveLeftWithPad<TSeparator>(FixedTimestamp<TSeparator> timestamp, short targetOperand)
Parameters
Returns
Type |
Description |
Int16 |
The resulting long value of the operation. |
RPG’s MOVE. Moves right a datetime into a int2 (short).
short MoveRight<TSeparator>(FixedTimestamp<TSeparator> timestamp, short targetOperand)
Parameters
Returns
Type |
Description |
Int16 |
The resulting short value of the operation. |
RPG’s MOVE. Moves right a datetime into a int4 (int).
short MoveRight<TSeparator>(FixedTimestamp<TSeparator> timestamp, short targetOperand)
Parameters
Returns
Type |
Description |
Int16 |
The resulting int value of the operation. |
RPG’s MOVE. Moves right a datetime into a int8 (long).
short MoveRight<TSeparator>(FixedTimestamp<TSeparator> timestamp, short targetOperand)
Parameters
Returns
Type |
Description |
Int16 |
The resulting long value of the operation. |
RPG’s MOVE. Moves right a date, time, timestamp in the given format to a char value.
char MoveRightToChar<TSeparator>(FixedTimestamp<TSeparator> timestamp)
Parameters
Returns
Type |
Description |
Char |
The rightmost character of the string representation of timestamp. |
RPG’s MOVE. Moves right a datetime into a int2 (short) with pad.
short MoveRightWithPad<TSeparator>(FixedTimestamp<TSeparator> timestamp, short targetOperand)
Parameters
Returns
Type |
Description |
Int16 |
The resulting short value of the operation. |
RPG’s MOVE. Moves right a datetime into a int4 (int) with pad.
short MoveRightWithPad<TSeparator>(FixedTimestamp<TSeparator> timestamp, short targetOperand)
Parameters
Returns
Type |
Description |
Int16 |
The resulting int value of the operation. |
RPG’s MOVE. Moves right a datetime into a int8 (long) with pad.
short MoveRightWithPad<TSeparator>(FixedTimestamp<TSeparator> timestamp, short targetOperand)
Parameters
Returns
Type |
Description |
Int16 |
The resulting long value of the operation. |
Subtracts a duration span from a date or a timestamp value.
DateTime SubtractDuration<TSeparator>(FixedTimestamp<TSeparator> timestamp, double duration, DurationCode durationCode)
Parameters
Returns
Type |
Description |
DateTime |
The resulting DateTime value after subracting from it the given duration. |
Returns the Date portion of a timestamp.
DateTime TimestampToDate<TSeparator>(FixedTimestamp<TSeparator> timestamp)
Parameters
Returns
Type |
Description |
DateTime |
The DateTime value containing the date portion of the timestamp argument. |
Returns the hours, minutes, and seconds of a timestamp.
DateTime TimestampToTime<TSeparator>(FixedTimestamp<TSeparator> timestamp)
Parameters
Returns
Type |
Description |
DateTime |
The DateTime value containing the hours, minutes, and seconds portion of the timestamp argument. |
Returns the hours and minutes of a timestamp.
DateTime TimestampToUSATime<TSeparator>(FixedTimestamp<TSeparator> timestamp)
Parameters
Returns
Type |
Description |
DateTime |
The DateTime value containing the hours and minutes portion of the timestamp argument. |
Converts a timestamp value to double.
double ToDouble<TSeparator>(FixedTimestamp<TSeparator> timestamp, bool throwOnOverflow)
Parameters
Type |
Parameter name |
Description |
FixedTimestamp<TSeparator> |
timestamp |
The timestamp value. |
Boolean |
throwOnOverflow |
Default is false. Pass true if a runtime exception is desired when the conversion doesn’t fit. |
Returns
Type |
Description |
Double |
The double value corresponding to the timestamp according to its format. |
Converts a timestamp to a decimal.
decimal ToFixedDecimal<TSeparator>(FixedTimestamp<TSeparator> timestamp, int digits, int decimals)
Parameters
Type |
Parameter name |
Description |
FixedTimestamp<TSeparator> |
timestamp |
The timestamp value. |
Int32 |
digits |
number of digits in the targetOperand. |
Int32 |
decimals |
number of decimal places in the targetOperand. |
Returns
Type |
Description |
Decimal |
The decimal value corresponding to the timestamp according to its format. |
Converts a timestamp value to float.
float ToFloat<TSeparator>(FixedTimestamp<TSeparator> timestamp, bool throwOnOverflow)
Parameters
Type |
Parameter name |
Description |
FixedTimestamp<TSeparator> |
timestamp |
The timestamp value. |
Boolean |
throwOnOverflow |
Default is false. Pass true if a runtime exception is desired when the conversion doesn’t fit. |
Returns
Type |
Description |
Single |
The float value corresponding to the timestamp according to its format. |
Converts a timestamp type to int 16.
short ToInt16<TSeparator>(FixedTimestamp<TSeparator> timestamp, bool throwOnOverflow)
Parameters
Type |
Parameter name |
Description |
FixedTimestamp<TSeparator> |
timestamp |
The timestamp value. |
Boolean |
throwOnOverflow |
Default is false. Pass true if a runtime exception is desired when the conversion doesn’t fit. |
Returns
Type |
Description |
Int16 |
The short value corresponding to the timestamp according to its format. |
Converts a timestamp type to int 32.
int ToInt32<TSeparator>(FixedTimestamp<TSeparator> timestamp, bool throwOnOverflow)
Parameters
Type |
Parameter name |
Description |
FixedTimestamp<TSeparator> |
timestamp |
The timestamp value. |
Boolean |
throwOnOverflow |
Default is false. Pass true if a runtime exception is desired when the conversion doesn’t fit. |
Returns
Type |
Description |
Int32 |
The int value corresponding to the timestamp according to its format. |
Converts a timestamp type to int 64.
long ToInt64<TSeparator>(FixedTimestamp<TSeparator> timestamp, bool throwOnOverflow)
Parameters
Type |
Parameter name |
Description |
FixedTimestamp<TSeparator> |
timestamp |
The timestamp value. |
Boolean |
throwOnOverflow |
Default is false. Pass true if a runtime exception is desired when the conversion doesn’t fit. |
Returns
Type |
Description |
Int64 |
The long value corresponding to the timestamp according to its format. |