Passing Dates

G

Guest

I need to pass vars betwenn pages, so I have the code and A calendar control
called calDate:

Context.Items.Add("TestVar","ABCEDFG")
Context.Items.Add("tmpStartDate", Format(calDate.SelectedDate.Year, "YYYY")
& Format(calDate.SelectedDate.Month, "MM") &
Format(calDate.SelectedDate.Day, "DD"))
Context.Items.Add("tmpStartTime", Format(txtStartTime.Text, "HH:MM:SS"))
Server.Transfer("MyResults.aspx")

in MyResults.aspx
I can grab these
tmpvar = Context.Items("TestVar") --<<ok
tmpDate = Context.Items("tmpStartDate") -<<< ??? can't get correct value
How can I get the correct value for the date, and is there an easier way to
format the date string, I tried format(calDate,"YYYYMMDD")
but it failed I guess because calDate.selecteddate returned '#8/17/2003#'. I
guess the # screwed the format function up.
How can I pass the date and format easier (if possible) it too. THanks
KT
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top