Forums

This topic is locked

Does SQL have a function to convert text to Date?

Posted 06 May 2003 07:12:56
1
has voted
06 May 2003 07:12:56 James Lee posted:
Hello all,

I wish to ask you is there a way to convert text to a date string data type? Like some programming language where it can convert INT to FLOAT.

Another question is that once I have a password inside the database and I have a string data type for that, my users can see the password if they do a query to my password table. Is there anyway, I can mask out the password so that my users cannot see my password even they do a query to the database?

Thanks for reading this!

Replies

Replied 06 May 2003 11:19:05
06 May 2003 11:19:05 Vince Baker replied:
use the cast function to convert a valid text field into a date (the format of the text must reflect a valid date format)

CAST(yourfieldname as smalldatetime)

For your password, create a view of the table that doesnt include the password field and let your users query that and not the table


Regards
Vince

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting

Reply to this topic