Long Date Function
#3
Even less LOC
Code: (Select All)
Do
    Line Input "mo-day-year: ", xdate$
    Print RTrim$(Mid$("January  February March    April    May      June     July     August   SeptemberOctober  November December ", (Val(Mid$(xdate$, 1, 2)) - 1) * 9 + 1, 9)); " ";
    Print LTrim$(Str$((Val(Mid$(xdate$, 4)))));
    If Mid$(xdate$, 4, 2) > "10" And Mid$(xdate$, 4, 2) < "21" Or Val(Mid$(xdate$, 5, 1)) = 0 Then
        Print "th, ";
    Else
        Print Mid$("stndrdthththththth", Val(Mid$(xdate$, 5, 1)) * 2 - 1, 2); ", ";
    End If
    Print Mid$(xdate$, 7, 4)
    Print
Loop
b = b + ...
Reply


Messages In This Thread
Long Date Function - by AtomicSlaughter - 05-21-2022, 09:20 PM
RE: Long Date Function - by Pete - 05-21-2022, 10:18 PM
RE: Long Date Function - by bplus - 05-24-2022, 08:22 PM



Users browsing this thread: 1 Guest(s)