MySQL Forums
Forum List  »  Stored Procedures

Re: validating date
Posted by: Paul McArdle
Date: June 28, 2005 04:42PM

if you know first part is a date 10 chasr long every time

set @a = '2005/12/31blahhhhhhh';
select @a;

'2005/12/31blahhhhhhh'

select date(left(@a,10)) as dateBit, right(@a,10) as theRest;
+------------+------------+
| dateBit | theRest |
+------------+------------+
| 2005-12-31 | blahhhhhhh |
+------------+------------+
1 row in set (0.01 sec)

Options: ReplyQuote


Subject
Views
Written By
Posted
2845
June 25, 2005 01:38AM
2199
June 26, 2005 11:51PM
2152
June 27, 2005 12:10AM
2260
June 27, 2005 03:49AM
2344
June 27, 2005 04:23AM
2010
June 27, 2005 07:54PM
Re: validating date
2067
June 28, 2005 04:42PM
2087
June 27, 2005 10:58PM
1993
June 28, 2005 11:00PM
1991
June 28, 2005 11:36PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.