#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    2
    Rep Power
    0

    Post Problem in condition by ( Sub Type variables )


    please ... help me this code :



    DateSYSTEM = FormatDateTime(date)
    RepDateSYSTEM = Replace(DateSYSTEM, "/", "")
    response.Write RepDateSYSTEM & " = RepDateSYSTEM<br><br>"


    DateUSER = "19/05/2012"
    RepDateUSER = Replace(DateUSER, "/", "")
    response.Write RepDateUSER & " = RepDateUSER<br><br>"


    Response.Write (TypeName(RepDateSYSTEM)) & "<br>"
    Response.Write (TypeName(RepDateUSER)) & "<br>"

    ' Here to fully and gave the result that the type variables RepDateSYSTEM RepDateUSER and type the text String




    ' The problem is that it deals with the value of the variable RepDateSYSTEM type the text String

    strVar1 = RepDateSYSTEM
    If isNumeric(strVar1) Then
    Response.Write "ok1"
    End If





    ' The problem is that it deals with the value of the variable RepDateUSER type the Numeric

    strVar2 = RepDateUSER
    If isNumeric(strVar2) Then
    Response.Write "ok2"
    End If


    'How do I make the required variables of the type digital together or String together so that I can successfully achieve the following condition:

    if RepDateSYSTEM = RepDateUSER then
    response.Write "yes <br>"
    else
    response.Write "no <br>"
    end if



    Thank you all ...
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,441
    Rep Power
    4539
    vbscript has various type conversion functions like CStr(), CInt(), etc. Check the vbscript documentation in the msdn library for details.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    2
    Rep Power
    0

    Post


    Thank you dear

    I test it and give you a response

    Thank you ...

IMN logo majestic logo threadwatch logo seochat tools logo