Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Future Date from Calendar
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,

I have a problem in picking future date from calendar. If today's date is 30/31 then it should pick next month's date. Please have a look on the code below.

Code:
mydate = day(now)

If (mydate>="30") Then
    mymonth = month(now+1)
    futurepickup=day(now+4)

Else
    futurepickup=day(now+1)

End If
Please help me with this issue.

Thanks in advance
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
HI SS001,

Where you are checking the month? As you know, the number of days are dependent on the month. So first check the month and then work with date.

Let me know if you need any more info.
Thanks,
SUpputuri
Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
The try is fine, but a simple search would have yielded you the results. Month & leap year are 2 things you may need to consider.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP not recognizing date calendar kQTPs 1 3,608 12-20-2017, 11:21 PM
Last Post: harikrishna
  select a date from pop-up calendar Dertjon 1 5,756 05-13-2014, 02:29 PM
Last Post: Ankur
  Select Current Date from a Calendar Control qtpbeginner78 11 25,418 06-04-2013, 05:38 AM
Last Post: qtpbeginner78
  How to capture the DATE from the Calendar control in a sharepoint application Simr 3 10,376 09-17-2012, 03:50 PM
Last Post: visitjaga
  Need Help Datatable Parameterzing Date debindas 1 3,672 08-30-2012, 11:43 PM
Last Post: QTPScript

Forum Jump:


Users browsing this thread: 1 Guest(s)