mmbasic:day_of_the_week_from_date_as_day_name
Table of Contents
Day of the Week from DATE$ as day name
A small wrapper function for Quazee137's tiny Day Of The week function. Takes a date string as dd-mm-yyyy e.g. that returned by DATE$ or LEFT$(Humantime$(x,0),10) and returns the day name.
Beware the date format must be dd-mm-yyyy, no error checking is performed.
Syntax:
DoWDay$(date_str$)
Example Usage:
Day$=DoWDay$(“20-08-1995”)
Dependencies:
Function DoWDay$(dd$) Select Case DayOfWeek(val(mid$(dd$,7,4)),val(mid$(dd$,4,2)),val(left$(dd$,2))) Case 0:DoWDay$="Sun" Case 1:DoWDay$="Mon" Case 2:DoWDay$="Tue" Case 3:DoWDay$="Wed" Case 4:DoWDay$="Thu" Case 5:DoWDay$="Fri" Case 6:DoWDay$="Sat" End Select End Function
mmbasic/day_of_the_week_from_date_as_day_name.txt · Last modified: 2024/01/19 09:30 by 127.0.0.1