Wolfram Language

Unidades y fechas

Extensos formatos de fechas

Obtenga un objeto de DateString con un formato de fecha común.

In[1]:=
Click for copyable input
DateString[]
Out[1]=

Obtenga una fecha usando el formato de fecha y tiempo ISO-8601.

In[2]:=
Click for copyable input
DateString["ISODateTime"]
Out[2]=

Interprete una cadena de caracteres de fecha como un formato ordinal de fecha ISO-8601.

In[3]:=
Click for copyable input
DateObject[{"2012-184", {"ISOOrdinalDate"}}]
Out[3]=

Obtenga una expresión de DateObject con formato de fecha de semana de ISO-8601.

In[4]:=
Click for copyable input
DateObject[DateFormat -> "ISOWeekDate"]
Out[4]=

Cree un objeto de fecha con un formato de fecha personalizado.

In[5]:=
Click for copyable input
DateObject[{2014, 8, 4}, DateFormat -> {"DayName", " ", "MonthName", " ", "Day", ", ", "YearRomanNumeral"}]
Out[5]=

Docenas de distintos elementos de formato de fecha están disponibles.

muestre la entrada completa de Wolfram Language
In[6]:=
Click for copyable input
flist = {"Date", "DateShort", "Time", "DateTime", "DateTimeShort", "ISODate", "ISOWeekDate", "ISOOrdinalDate", "ISODateTime", "ADBC", "CEBCE", "Year", "YearShort", "ISOYear", "YearRomanNumeral", "YearUnsigned", "QuarterName", "QuarterNameShort", "Quarter", "MonthName", "MonthNameShort", "MonthNameInitial", "Month", "MonthShort", "MonthRomanNumeral", "MonthRomanNumeralLowerCase", "Week", "WeekShort", "DayName", "DayNameShort", "DayNameInitial", "ISOWeekDay", "Day", "DayShort", "ISOYearDay", "ISOYearDayShort", "Hour", "Hour12", "Hour24", "HourShort", "Hour12Short", "Hour24Short", "AMPM", "AMPMLowerCase", "TimeZoneGMTRelative", "ISOTimeZOne", "TimeZoneName", "TimeZoneNameShort", "Minute", "MinuteShort", "Second", "SecondShort", "SecondExact", "Millisecond", "MillisecondShort"}; Rasterize[ Grid[Map[Pane[ Style[# /. Last[flist] -> "Custom", ScriptLevel -> 0], {300}] &, Join[{{"Date String Format", DateObject[{2016, 2, 9}]}}, Transpose[{flist, Map[DateString[{2016, 2, 9, 14, 8, 4.2301}, #] &, flist]}]], {2}], Dividers -> All, Spacings -> {2, 2}, Background -> {None, {{None, GrayLevel[.9]}}, {{1, 1} -> Hue[.6, .4, 1], {1, 2} -> Hue[.6, .4, 1]}}, BaseStyle -> {FontFamily -> Times, FontSize -> 13}] // TraditionalForm, ImageResolution -> 144, RasterSize -> 600, ImageSize -> 300]
Out[6]=

Ejemplos relacionados

de en fr ja ko pt-br ru zh