Hi All,
I am wanting to get the weekday from my 1307 module. I can get all the other data like hour Minute etc.
but can't find a keyword that will work. I am using the Margiolis lib and the notes show the keywords thus:-
#######################################
#######################################
now KEYWORD2
second KEYWORD2
minute KEYWORD2
hour KEYWORD2
day KEYWORD2
month KEYWORD2
year KEYWORD2
isAM KEYWORD2
isPM KEYWORD2
weekday KEYWORD2
setTime KEYWORD2
adjustTime KEYWORD2
setSyncProvider KEYWORD2
setSyncInterval KEYWORD2
timeStatus KEYWORD2
TimeLib KEYWORD2
#######################################
Instances (KEYWORD2)
#######################################
#######################################
Constants (LITERAL1)
#######################################
I've tried various combinations of weekday but it won't compile, comes up with
'struct tmElements_t' has no member named 'weekday'.
When I type in "weekday"it comes up in the red text as other keywords.
If I'm looking at the corrrect library, you should be able to print the text for the day of the week from dayStr(weekday()) or dayShortStr(weekday()) .
tm.Wday would be the numeric day of the week, starting with Sunday as 1
Using UKHeliBob's suggestion sorted it out, I was having trouble with the weekday using the case function to print the day of week.
Cheers ........ Blakus
Hi All,
I am using the line " switch(weekday()){" to get the weekday but it is not updating, ie. it returns the digit 5 all the time. I can't think of what is wrong, the date and time are updating OK but not the weekday.