Forums
This topic is locked
help with this code please
Posted 18 Mar 2005 08:16:37
1
has voted
18 Mar 2005 08:16:37 Jaime Romo posted:
hello there i need help with thisd code,..... i have 2 days trying to figure out whats wrong and still cant understand ithere is the page........................
www.espaciosanmiguel.com/otro/calendar.asp
tha code is in this URL ..... i couldent type it here..... the code is in red color
www.espaciosanmiguel.com/codigo.htm
Visit my home page
www.cancuncoral.com
Replies
Replied 18 Mar 2005 12:14:15
18 Mar 2005 12:14:15 Lee Diggins replied:
Ji Jaime
Try this:
If CDate(objRecordset.Fields("Year") = Year(dDate) Then
If CDate(objRecordset.Fields("Month") = Month(dDate) Then
If CDate(objRecordset.Fields("Day") = iCurrent Then
Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
<b>Lee Diggins</b> - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>
Try this:
If CDate(objRecordset.Fields("Year") = Year(dDate) Then
If CDate(objRecordset.Fields("Month") = Month(dDate) Then
If CDate(objRecordset.Fields("Day") = iCurrent Then
Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
<b>Lee Diggins</b> - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>
Replied 20 Mar 2005 04:55:25
20 Mar 2005 04:55:25 Jaime Romo replied:
thanks a lot my friend it works now...... thank you very very much
Visit my home page
www.cancuncoral.com
Visit my home page
www.cancuncoral.com
Replied 21 Mar 2005 10:35:20
21 Mar 2005 10:35:20 Lee Diggins replied:
JHi Jaime
You're welcome!
Do you know why it didn't work and what the CDate function does?
Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
<b>Lee Diggins</b> - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>
You're welcome!
Do you know why it didn't work and what the CDate function does?
Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
<b>Lee Diggins</b> - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>
Replied 27 Mar 2005 07:24:32
27 Mar 2005 07:24:32 Jaime Romo replied:
mmmm nop not really im not very good programing can u explain me???
Visit my home page
www.cancuncoral.com
Visit my home page
www.cancuncoral.com
Replied 27 Mar 2005 17:05:48
27 Mar 2005 17:05:48 Lee Diggins replied:
Hi Jaime
The use of the VBScript CDate() function converts a value into a date type format. This is the reason the the code was failing, the value from the recordset was not in a Date format.
You chould download and install the 5.6 script documentation from MS, this give examples of VBScript, JScript and WSH with fairly decent explanations of how to use different function available. You can find it here:
www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en
If you need any help with any thing else, post back on these forums.
Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
<b>Lee Diggins</b> - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>
The use of the VBScript CDate() function converts a value into a date type format. This is the reason the the code was failing, the value from the recordset was not in a Date format.
You chould download and install the 5.6 script documentation from MS, this give examples of VBScript, JScript and WSH with fairly decent explanations of how to use different function available. You can find it here:
www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en
If you need any help with any thing else, post back on these forums.
Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
<b>Lee Diggins</b> - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>