You need to be doing 8+ minutes of intense abdominal exercise every day. If its not uncomfortable/tiring/painful you're probably not working hard enough. Some exercises you may want to include in your routine are crunches, side crunches, leg lifts, leg extensions, flutter kicks, russian twists, and bicycles.
Ab work alone is not enough. Lots of cardio daily is essential. I find the best way to actually get results from cardio is to engage in some sort of sport or activity that invloves cardiovascular work but has a purpose (like scoring a goal) you end up working much harder and not thinking about it.
Finally, many people say diet is the most important part of getting a six pack. Hopefully someone else can comment on this, I am not very good with nutrition explanations.
As far as getting it in 40 days, it really depends on your metabolism, and how fit you are to start with. Still you should see some definite improvements in that time. I wouldn't be suprised if you achieved a satisfactory goal.