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
2829
June 25, 2005 01:38AM
2188
June 26, 2005 11:51PM
2144
June 27, 2005 12:10AM
2246
June 27, 2005 03:49AM
2332
June 27, 2005 04:23AM
1997
June 27, 2005 07:54PM
Re: validating date
2059
June 28, 2005 04:42PM
2070
June 27, 2005 10:58PM
1983
June 28, 2005 11:00PM
1980
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.