Jump to content

Search the Community

Showing results for tags 'Type Missmatch'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. [*] Hi I have a work around for this one but for other reasons I want to work with numeric dates e.g. 01/02/2010 rather than string dates e.g. 1 February 2010. IF I use the Visual basic adate = CDate(#1/2/2010#) all works perfectly and adate would have the value 01/02/2010 in date format. Here is where the problem starts. The date is captured from an ASP Form using form dropdowns for day and month so the code looks like this Dim xday, xmonth, xyear, adate xday = Request.Form("xday") xmonth = Request.Form("xmonth") xyear = Request.Form("xyear") adate = CDate("#" & aday & "/" & amoth & "/" & ayear & "#") Result is a Type Mismatch The problem is obvious CDate("#" & aday & "/" & amonth & "/" & ayear & "#") Is effectively equivalent to CDate("#01/02/2010#") (a String Value) Causing the Error as the required value #01/02/2010# is not a string value. Question: How do I convert the Concatenated String "#01/02/2010#" into the correct format for CDate to work correctly so that the value adate can be inserted into a Database Date Field? The work Around uses the Month Names I.e February and code CDate(aday & " " & amonth & " " & ayear) Which does work but requires the extra coding later on to covert amonth to a numeric month number.
×
×
  • Create New...