Repository navigation
Category Date and Time Functions
Paul Squires edited this page Oct 19, 2026
·
2 revisions
Home › All Categories › Date and Time Functions
Grouped by task. Dates and times lists them beside the rest of the area.
| Function | What it does | From |
|---|---|---|
| Date | Returns today's date as text in the form mm-dd-yyyy. | built-in |
| Time | Returns the current time as text in the form hh:mm:ss. | built-in |
| Now | Returns the current local date and time as a date serial. | datetime.bi |
| Function | What it does | From |
|---|---|---|
| Timer | Returns the seconds since a fixed starting point, for measuring elapsed time. | built-in |
| Function | What it does | From |
|---|---|---|
| DateSerial | Returns the date serial for a year, month and day; out-of-range values roll over. | datetime.bi |
| TimeSerial | Returns the fraction of a day for an hour, minute and second, to add to a date serial. | datetime.bi |
| Function | What it does | From |
|---|---|---|
| Year | Returns the year of a date serial. | datetime.bi |
| Month | Returns the month of a date serial, 1 to 12. | datetime.bi |
| Day | Returns the day of the month of a date serial. | datetime.bi |
| Hour | Returns the hour of a date serial, 0 to 23. | datetime.bi |
| Minute | Returns the minute of a date serial. | datetime.bi |
| Second | Returns the second of a date serial. | datetime.bi |
| DatePart | Returns one part of a date serial, such as its year, quarter, week or hour. | datetime.bi |
| Function | What it does | From |
|---|---|---|
| DateAdd | Returns a date serial moved by a number of years, months, days, hours or other units. | datetime.bi |
| Function | What it does | From |
|---|---|---|
| DateDiff | Counts the years, months, days or other units between two date serials. | datetime.bi |
| Function | What it does | From |
|---|---|---|
| DateValue | Returns the date serial for text written in the system's date format. | datetime.bi |
| TimeValue | Returns the date serial of a time written like 23:59:59 or 11:59:59PM. | datetime.bi |
| IsDate | Returns true if the text can be read as a date in the system's date format. | datetime.bi |
| Function | What it does | From |
|---|---|---|
| Weekday | Returns the day of the week, 1 to 7, counting from Sunday unless told otherwise. | datetime.bi |
| Function | What it does | From |
|---|---|---|
| MonthName | Returns the name of a month number in the system's language, or its abbreviation. | datetime.bi |
| WeekdayName | Returns the name of a weekday number in the system's language, or its abbreviation. | datetime.bi |
| Function | What it does | From |
|---|---|---|
| SetDate | Sets the system date from text like mm-dd-yyyy; needs admin rights, 0 means success. | built-in |
| SetTime | Sets the system time from text like hh:mm:ss; needs admin rights, 0 means success. | built-in |
tiko-lang · Home · Feature Index · Keyword Index · License
FreeBASIC manual pages reproduced under the GNU FDL 1.3.
- Home
- What Is tiko-lang
- Quick Start
- Installing on macOS
- Android (experimental)
- Debugging
- Feature Index
- Compatibility
- FAQ
- AI Cheatsheet
- Generics
- Interfaces
- For Each
- Iterators
- Tuples
- Array Results
- Defer
- Match
- Lambdas
- Block Strings
- Partial Types
- String Slices
- Array Slices
- Embed
- Typed Variadics
- C Header Import
- Foreign Library Linking
- UString
- Fixed-Width Types
- Nullptr
- String Library
- Format
- Array
- Map
- Set
- LinkedList
- OrderedMap
- OrderedSet
- Sorting
- Optional
- Result
- Smart Pointers
- Date and Time (Chrono)
- Time Zones
- Filesystem
- File Streams
- Config (INI and TOML)
- Codec
- Hash
- UUID
- OS
- Process
- Net
- HTTP and TLS
- Math Library
- Finance
- Logging
- Terminal TUI Library
- tkControls
- sys/win
- Goroutines and Channels
- LLVM Backend
- tiko build
- tiko test
- tiko doc
- TIKO_COMPILER
- Variable Declarations
- Standard Data Types
- User Defined Types
- Procedures
- Operators
- Control Flow Statements
- Converting Data Types
- Array Functions
- String Functions
- Mathematical Functions
- Bit Manipulation
- Date and Time Functions
- File I/O Functions
- Console Functions
- User Input (Runtime Library)
- User Input Functions (Graphics Library)
- Screen Functions
- 2D Drawing Functions
- Graphics Library Reference
- Graphics Keyword List
- Memory Functions
- Threading Support Functions
- Error Handling Functions
- Operating System Functions
- Preprocessor
- Intrinsic Defines
- Miscellaneous Keywords
- Modularizing