Buy Questpond's video subscriptions on
huge discount
.
Online: 3919
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Forums
>
ASP.NET
>
Loading ...
Regular expression
Posted by
Sibin.rhythm
under
ASP.NET
on 8/24/2009 | Views : 2203 | Status :
[Member]
| Replies : 5
Write New Post
|
Search Forums
|
Resolved Posts
|
Un Answered Posts
|
Forums Home
I need regular expression for date in the given format
dd/mm/yyyy hh:mm am/pm
It will Never accept any other format
anybody help me????
Reply
|
Reply with Attachment
Alert Moderator
Responses
Posted by:
Lakhangarg
on: 8/24/2009
[Member]
[Moderator]
Silver
0
Hi-
Use This for dd/mm/yyyy format
(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d
Thanks & Regards
Lakhan Pal Garg
http://lakhangarg.blogspot.com/
Sibin.rhythm
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Sibin.rhythm
on: 8/24/2009
[Member]
Starter
0
Thank you Lakhan Pal Garg ,
But I need expression not only for date but for Time also .
I need to type the textbox value in the following format
mm/dd/yyyy hh:mm am/pm
Wheather any body gives any other format of time and date , then the error message should display.
So please help me with the above format's regular expression....
Sibin.rhythm
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Lakhangarg
on: 8/24/2009
[Member]
[Moderator]
Silver
0
Hi-
Check out this: ^((((([13578])|(1[0-2]))[\-\/\s]?(([1-9])|([1-2][0-9])|(3[01])))|((([469])|(11))[\-\/\s]?(([1-9])|([1-2][0-9])|(30)))|(2[\-\/\s]?(([1-9])|([1-2][0-9]))))[\-\/\s]?\d{4})(\s((([1-9])|(1[02]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([AM|PM|am|pm]{2,2})))?$
for more detail visit:
http://regexlib.com/Search.aspx?k=Datetime&c=-1&m=-1&ps=20
Thanks & Regards
Lakhan Pal Garg
http://lakhangarg.blogspot.com/
Sibin.rhythm
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Sibin.rhythm
on: 8/24/2009
[Member]
Starter
0
Thankyou Mr.Lakhan Pal Garg
I am going to apply these code to my project.
I will contact u if there has more clarifications.
Thankyou once again
Sibin.rhythm
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Lakhangarg
on: 8/24/2009
[Member]
[Moderator]
Silver
0
You are welcome..
no problem you can contact me at any time??
:)
Regards
Lakhan Pal Garg
Sibin.rhythm
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Login to post response
Latest Posts
How to get the exact property name while getting error
(0)
PDB file is not showing Line Number in dot net application hosted on server
(0)
Both Strings morethan 5 letters in length end of the words one vowel and one consonent is different
(0)
how to check Any adjacent letters transposed between two strings(ex: JOHN, JHON)
(1)
can't receive data after success login ?
(1)
Implement Multi-Tenant in Azure Logic Apps
(0)
Why ASP.Net Core 7.0 Web API showing as Connection refused?
(0)
Iterating over columns of dataframe and print as rows in Python Django
(0)
More ...