Day Function

Purpose

Returns a whole number between 1 and 31, inclusive, representing the day of the month.

Syntax

Day(time)

Description

The time argument is any expression that can represent a time.

Example

Debug.Show

Local z As Date = HmsToTime(110000, 20, 4000)

Trace Day(z)

Trace Day(Now)

Trace Day(Date)

Trace Day(#12:12:12#)

Trace FileDateTime("c:\windows\notepad.exe")

Trace Day(FileDateTime("c:\windows\notepad.exe"))

Remarks

You can indicate a time in hours, minutes and seconds, separated by “ : “; or only with four numbers for hours and minutes (with or without the using of AM or PM). Using only 4 characters forces the GFABASIC 32 editor to automatically add “:00“ for the seconds. When using AM or PM the editor automatically converts to 24 hour mode. For instance, "#2:24#" will automatically convert to #14:24:00#, and (#2:24AM#) => (#02:24:00#).

See Also

CDate(), Date, Date$, DateAdd(), DateDiff(), DatePart(), DateSerial(), DateTime$(), DateToDmy, DateToDmyHms, DateValue(), Day(), DayNo(), DmyHmsToDate(), DmyToDate(), HmsToTime(), Hour(), IsDate(), Minute(), Month(), Now, Now$(), TimeSerial(), TimeToHms, TimeValue(), Second(), Week(), WeekDay(), Year()

{Created by Sjouke Hamstra; Last updated: 28/09/2014 by James Gaite}