DayNo Function

Purpose

Returns a whole number between 1 and 365 (366 for leap years), inclusive, representing the day of the year.

Syntax

DayNo(time)

Description

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

Example

Debug.Show

Local z = HmsToTime(110000, 20, 4000)

Trace z

Trace DayNo(z)

Trace DayNo(Now)

Trace DayNo(Date)

Trace DayNo(#12:12:12#)

Trace DayNo(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}