Custom Calendar

Cableguy

Expert
Licensed User
Longtime User
Hi guys
having spendt so much time away from my PC, my logic thinking is a bit lazzy and confused....

I am trying to create a custom calendar, and I can't figure out how to get the current day of the week number.
ie, assuming Sunday is "0", if today is Monday, I need to Get "1", regardless of the date...
How can I do this?
I am using Locale dll in my project, if this helps...

EDIT : I forgot to say, I m using locale to make my app locale aware ;-), that why I needs this logic...
 
Last edited:

derez

Expert
Licensed User
Longtime User
you can use DateDayofWeek first to get the name of the day, and then to get the value using a hashtable which holds the pairs of names and numbers, with the property item:
(from the help)-
"Returns the value matching the specified key.
Returns an empty string if the key was not found.
Syntax: Item (Key)


Example:
Amount = Hashtable1.Item("apples") "

the hashtable can hold many sets of pairs, to keep all locale possibilities.
 
Top