Login

ItemSample CodeOutput
ClockB.time.Clock.systemDefaultZone().instant()2024-05-09T11:32:54.871094205Z
date()B.time.date()Thu May 09 04:32:54 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()THURSDAY
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-09T11:32:54.874199857Z
LocalDateB.time.LocalDate.now()2024-05-09
LocalDateTimeB.time.LocalDateTime.now()2024-05-09T04:32:54.874642920
LocalTimeB.time.LocalTime.now()04:32:54.874827384
MonthB.time.ZonedDateTime.now().getMonth()MAY
MonthDayB.time.MonthDay.now()--05-09
OffsetDateTimeB.time.OffsetDateTime.now()2024-05-09T04:32:54.877098389-07:00
OffsetTimeB.time.OffsetTime.now()04:32:54.877858254-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-09T04:32:54.881414338-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 09, 2024 4:32AM
DateTimeFormatter.BASIC_ISO_DATEconst dateFormatter = B.time.DateTimeFormatter.BASIC_ISO_DATE; B.time.ZonedDateTime.now().format(dateFormatter)20240509-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-09-07:00
DateTimeFormatter.RFC_1123_DATE_TIMEconst dateFormatter = B.time.DateTimeFormatter.RFC_1123_DATE_TIME; B.time.ZonedDateTime.now().format(dateFormatter)Thu, 9 May 2024 04:32:54 -0700