Get WeekDay from FIELD Date Value

Mindwatering Incorporated

Author: Tripp W Black

Created: 11/03/2011 at 07:12 AM

 

Category:
Notes Developer Tips
JavaScript, LotusScript

JavaScript:
var dt = new Date(f.MyDateFIELD.value);
var wkday = dt.getDay();
alert(wkday);


LotusScript:
Function GetCurrWkDay() As String
Dim tmpday As Integer
tmpday = Weekday(Today)
Select Case tmpday
Case 1
GetCurrWkDay = "Su"
Case 2
GetCurrWkDay = "M"
Case 3
GetCurrWkDay = "T"
Case 4
GetCurrWkDay = "W"
Case 5
GetCurrWkDay = "Th"
Case 6
GetCurrWkDay = "F"
Case 7
GetCurrWkDay = "Sa"
Case Else
GetCurrWkDay = ""
End Select
End Function


previous page