Day() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Returns the day component from a Date expression. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

Day( date_expr )

date_expr is a Date expression.

Return Value

SmallInt from 1 to 31

Description

The Day() function returns an integer value from one to thirty-one, representing the day-of-the-month component of the specified date. For example, if the specified date is 12/17/13, the Day() function returns a value of 17.

Example

Dim day_var As SmallInt, date_var As Date 
date_var = StringToDate("05/23/2014")
day_var = Day(date_var) 

See Also:

CurDate() function, Day() function, Minute() function, Month() function, Second() function, Timer() function, Weekday() function, Year() function