How to get the weekday name?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Knows some wx things
Knows some wx things
Posts: 48
Joined: Fri Dec 07, 2007 1:09 pm

How to get the weekday name?

Post by thulaseeram » Tue Apr 22, 2008 7:08 am

Hi to All,

i am using the following code to get the weekday name but it is not working please can any one help me how to solve this.

wxString dayname=date.GetWeekDayName (date.GetDay(), date.Name_Full);

if i use the above code i am getting following error

"wxDateTime::GetWeekDayName' : cannot convert parameter 1 from 'wxDateTime::wxDateTime_t' to 'wxDateTime::WeekDay"

please can any one tell me how to solve this.


Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands

Post by Jorg » Tue Apr 22, 2008 7:39 am

What if you do:

Code: Select all

 wxString dayname=date.GetWeekDayName (date.GetWeekDay(), date.Name_Full); 
GetDay() returns 1-31 and not the enumerator for the weekday name.

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
Jorg's WasteBucket

Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 211
Joined: Sat Sep 02, 2006 7:24 pm
Location: Ukraine

Post by lester » Tue Apr 22, 2008 9:26 am

wxDateTime::Format( _T("%A") )

Post Reply