Date.From
Δημιουργεί μια ημερομηνία από την τιμή που δόθηκε.
Syntax
Date.From(
value as any,
optional culture as text
) as date
Remarks
Returns a date value from the given value.
value: The value to covert to a date. If the given value isnull, this function returnsnull. If the given value isdate,valueis returned. Values of the following types can be converted to adatevalue:text: Adatevalue from textual representation. Refer toDate.FromTextfor details.datetime: The date component of thevalue.datetimezone: The date component of the local datetime equivalent ofvalue.number: The date component of the datetime equivalent of a floating-point number whose integral component is the number of days before or after midnight, 30 December 1899, and whose fractional component represents the time on that day divided by 24. For example, midnight, 31 December 1899 is represented by 1.0; 6 A.M., 1 January 1900 is represented by 2.25; midnight, 29 December 1899 is represented by -1.0; and 6 A.M., 29 December 1899 is represented by -1.25. The base value is midnight, 30 December 1899. The minimum value is midnight, 1 January 0100. The maximum value is the last moment of 31 December 9999.- If
valueis of any other type, an error is returned.
culture: The culture of the given value (for example, "en-US").
Examples
Example #1
Μετατροπή της καθορισμένης ημερομηνίας και ώρας σε τιμή ημερομηνίας.
Date.From(#datetime(1899, 12, 30, 06, 45, 12))
Result:
#date(1899, 12, 30)
Example #2
Μετατροπή του καθορισμένου αρι θμού σε τιμή ημερομηνίας.
Date.From(43910)
Result:
#date(2020, 3, 20)
Example #3
Μετατρέψτε τις γερμανικές ημερομηνίες κειμένου στη στήλη "