Contents:
Introduction
News blog
What is Servoy?
Getting Started
Comparison Servoy/VFP
Performance
How-To's
Code Reference
VFP2Servoy Toolkit
Contact / feedback
|
CDOW() - globals.CDOW()
Returns the day of the week from a given Date or DateTime expression.
VFP code example
d = DATE(2072,10,15)
? CDOW(d) // Saturday
|
Servoy code example
utils.stringFormat('%tA', new Array(new Date(2072,9,15)))
// Saturday
//
OR using the CDOW() function alternative:
var d
=
new Date(2072,9,15)
// MONTH 9 = OCTOBER !!
application.output(globals.CDOW(d))
// saturday/samstag/zaterdag
|
|
Conclusion:
This function actually works better than it does in Visual FoxPro because it returns the day of the week in the current Locale
whereas VFP returns it in English only. The only pain is in the fact that the Date() function in Servoy/JavaScript has
the crazy logic that the first month (January) is 0 and the first day is 1?! Better add a DATE() function as well.
|
External resources:
vfp plugin
ServoyWorld 2012 pics
Official Servoy website
Ken Levy on Servoy
Servoy info
Servoy Forum
Servoy Documentation
|