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
3020
June 25, 2005 01:38AM
2348
June 26, 2005 11:51PM
2241
June 27, 2005 12:10AM
2369
June 27, 2005 03:49AM
2491
June 27, 2005 04:23AM
2140
June 27, 2005 07:54PM
Re: validating date
2154
June 28, 2005 04:42PM
2185
June 27, 2005 10:58PM
2088
June 28, 2005 11:00PM
2089
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.