Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
need 7 dates from selected date
Old 03-27-2006, 06:00 PM need 7 dates from selected date
Average Talker

Posts: 19
Trades: 0
Hello all. Not sure if this is the right place to post this, but what I have is a time card system, and because of the multiple entries per day, I have a separate page for each day of the week. So, the first thing the user will do is enter the first date of the time period in a text field and press 'Submit', and based on the date chosen, I need that date and the following six dates stored in variables which I can use to populate the dates in the pages for each day of the week. How hard would this be to accomplish, and where would I start? Once I get the values in variables, I think I could manage from there.

Thank you so much in advance,

Parallon
parallon is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-27-2006, 07:31 PM Re: need 7 dates from selected date
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
DateAdd ("d", 7, Your_date_Variable) will generate your date one week from today.

Just change the 7 with the appropriate value to get the number of days added.

http://www.haneng.com/FunctionSearch.asp?s=DateAdd
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 03-28-2006, 10:22 PM Re: need 7 dates from selected date
Average Talker

Posts: 19
Trades: 0
Thank you. I finally figured it out. Now I am in a different roadblock. Now that I have each of the dates in a separate variable, how would I get those variables to each of the seven pages to use on the appropriate day of the week? Remember, the user will select the starting date, and the variables will be created based on that date. The first page is easy because I do a request.form and get the variable from the previous form where all of the variables are set, but how would I get it to the other pages if they aren't the first one selected? The thing is that each page of the week is tabbed so that you can directly access any other day without having to go back to the first page.

I know this is confusing, so if you need a better explanation, let me know.

Basically it works like this:

pg1 Monday
/ pg2 Tuesday
/ / pg3 Wednesday
/ / / pg 4 Thursday
/ / / / pg 5 Friday
/ / / / / pg 6 Saturday
/ / / / / / pg 7 Sunday
/ / / / / / /
/ / / / / / /
__________
| Page with |
| 7 Variables |
-----------------

I have attached a screenshot to give you a better idea.

Thanks,

Parallon
Attached Images
File Type: jpg timesheet.jpg (48.1 KB, 5 views)
parallon is offline
Reply With Quote
View Public Profile
 
Old 03-29-2006, 03:51 AM Re: need 7 dates from selected date
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Not sure if I get you, but this might help:
Code:
Page = CInt (Request.QueryString ("page"))
if Page = 0 then
     Page = CInt (Request.Form ("page"))
end if
if Page < 1 then
     Page = 1
end if
if Page > 7 then
     Page = 7
end if
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Reply     « Reply to need 7 dates from selected date
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.87496 seconds with 13 queries