Isn't it possible to make the collumn an INT.. ??? Or even better, a Date/Time.. ?
What you can try thought (but I don'tthink that this will work) is to multiply the
column(s)
which contains the varchar with 1 when you do the query......

If it should be an varchar.. (can't think of a reason) you can maybe keep a second
column with the INT version..?

Bye
David


----- Original Message -----
From: "Jerry" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 27, 2001 04:00
Subject: Is converting string to integer possible?


> Hi
>
> I have 2 text columns VARCHAR 50 and I put a date in them in format
>
> yyyymmddhhmmss
>
> All working well, but I need to compare this field with the curent date and it
> doesn't work, as both fields are string.
>
> Is there a way to force string to be read as interger (same as CINT in
> VBScript, but I need to to this in mySQL).
>
> Yours
>
> Jerry
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to