Freigeben über


DateValue Class

Definition

Represents a Date only, without a time component, in the local time zone.

public class DateValue : Microsoft.PowerFx.Types.PrimitiveValue<DateTime>
type DateValue = class
    inherit PrimitiveValue<DateTime>
Public Class DateValue
Inherits PrimitiveValue(Of DateTime)
Inheritance

Fields

_value (Inherited from PrimitiveValue<T>)

Properties

CanShallowCopy (Inherited from FormulaValue)
Type (Inherited from FormulaValue)
Value
Obsolete.

Direct use of Value is prohibited in favor of GetConvertedValue(TimeZoneInfo) method. Only use 'new' keyword here to catch accidental uses of base class method.

Methods

AsBoolean() (Inherited from FormulaValue)
AsDecimal() (Inherited from FormulaValue)
AsDouble() (Inherited from FormulaValue)
GetConvertedValue(TimeZoneInfo)

Converts To UTC time if value is not utc and timeZoneInfo is utc. Converts from UTC time if value is utc and timeZoneInfo is non utc. else returns the value/>/>. NOTE: if timeZoneInfo is null, Local time zone is used.

MaybeShallowCopy()

Before mutation operations, call MaybeShallowCopy() to make a copy of the value. For most values this is a no-op and will not make a copy. Only types which implement IMutationCopy will have the opportunity to provide a copy.

(Inherited from FormulaValue)
ToExpression()

Provides serialization. Return an expression that, when evaluated in the invariant locale, recreates an equivalent formula value, including its type. This may not be the same as the expression used to originally create this type.

(Inherited from FormulaValue)
ToExpression(StringBuilder, FormulaValueSerializerSettings)
ToObject() (Inherited from PrimitiveValue<T>)
TryGetPrimitiveValue(Object) (Inherited from FormulaValue)
TryShallowCopy(FormulaValue) (Inherited from FormulaValue)
Visit(IValueVisitor)

Extension Methods

CanCoerceToStringValue(FormulaValue)

Can convert value to String format or not.

TryCoerceTo(FormulaValue, RuntimeConfig, StringValue)

Try to convert value to String format.

TryCoerceTo(FormulaValue, RuntimeConfig, CancellationToken, StringValue)

Try to convert value to String format.

TryCoerceTo(FormulaValue, BooleanValue)

Try to convert value to Boolean format.

TryCoerceTo(FormulaValue, DateTimeValue)

Try to convert value to DateTime format.

TryCoerceTo(FormulaValue, DecimalValue)

Try to convert value to Number format.

TryCoerceTo(FormulaValue, FormulaType, FormulaValue)
TryCoerceTo(FormulaValue, NumberValue)

Try to convert value to Number format.

TryCoerceTo(FormulaValue, StringValue)

Try to convert value to String format.

Applies to