Login

ItemSample CodeOutput
ClockB.time.Clock.systemDefaultZone().instant()2024-05-18T06:46:21.772669741Z
date()B.time.date()Fri May 17 23:46:21 MST 2024
DateTimeFormatterB.time.DateTimeFormatter.ofPattern('MMMM dd, yyyy')
Note: See details below.
Text(MonthOfYear)' 'Value(DayOfMonth,2)','' 'Value(YearOfEra,4,19,EXCEEDS_PAD)
DateTimeFormatterBuilderB.time.DateTimeFormatterBuilder-- TODO --
DayOfWeekB.time.ZonedDateTime.now().getDayOfWeek()FRIDAY
DurationB.time.Duration.ofHours(12)PT12H
FormatStyle?-- TODO --
InstantB.time.Instant.now()
Note: Instant is a specific instant in time without specifying the time Zone.
2024-05-18T06:46:21.778853914Z
LocalDateB.time.LocalDate.now()2024-05-17
LocalDateTimeB.time.LocalDateTime.now()2024-05-17T23:46:21.779711045
LocalTimeB.time.LocalTime.now()23:46:21.780611976
MonthB.time.ZonedDateTime.now().getMonth()MAY
MonthDayB.time.MonthDay.now()--05-17
OffsetDateTimeB.time.OffsetDateTime.now()2024-05-17T23:46:21.796281092-07:00
OffsetTimeB.time.OffsetTime.now()23:46:21.798394899-07:00
PeriodB.time.Period.ofDays(7)P7D
TextStyle?-- TODO --
ValueRange?-- TODO --
YearB.time.Year.now()2024
YearMonthB.time.YearMonth.now()2024-05
ZoneIdB.time.ZoneId.systemDefault()SystemV/MST7
ZoneOffsetB.time.ZoneOffset.systemDefault()SystemV/MST7
ZonedDateTimeB.time.ZonedDateTime.now()
Note: ZonedDateTime is a specific instant in time including the time zone.
2024-05-17T23:46:21.805775593-07:00[SystemV/MST7]
Use ZonedDateTime with DateTimeFormatter. Using val() from a Relate date/time field returns a date in the ZonedDateTime format. You can also convert a date/time to ZonedDateTime using toZonedDateTime.
ItemSample CodeOutput
DateTimeFormatter.ofPattern()const dateFormatter = B.time.DateTimeFormatter.ofPattern('MMMM dd, yyyy h:mma'); B.time.ZonedDateTime.now().format(dateFormatter)May 17, 2024 11:46PM
DateTimeFormatter.BASIC_ISO_DATEconst dateFormatter = B.time.DateTimeFormatter.BASIC_ISO_DATE; B.time.ZonedDateTime.now().format(dateFormatter)20240517-0700
DateTimeFormatter.ISO_DATEconst dateFormatter = B.time.DateTimeFormatter.ISO_DATE; B.time.ZonedDateTime.now().format(dateFormatter)
Note: There are more ISO date/time formats, a few common ones are shown here.
2024-05-17-07:00
DateTimeFormatter.RFC_1123_DATE_TIMEconst dateFormatter = B.time.DateTimeFormatter.RFC_1123_DATE_TIME; B.time.ZonedDateTime.now().format(dateFormatter)Fri, 17 May 2024 23:46:21 -0700