Timestamp
OSL provides powerful methods for working with timestamps and date/time conversions.
Converting Timestamps
To Date/Time Formats
Getting Components
Examples
Important Notes
Format Details
Date format: "YYYY-MM-DD"
Time format: "HH:MM:SS"
Full format: "YYYY-MM-DD HH:MM:SS"
Relative format: Human-readable time difference
Component Formatting
Months and days include leading zeros
Hours are in 24-hour format without leading zeros
Minutes and seconds include leading zeros
Year is full 4-digit format
Usage Tips
All methods return strings
Relative time is automatically calculated
Invalid timestamps return appropriate error messages
Methods can be chained with other string operations
Last updated
Was this helpful?