473,378 Members | 1,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

IsDate VB function equivalent


Hi,

Anyone knows what the equivalent of the IsDate function is in C#?

Thanks
Mike
Nov 16 '05 #1
3 8082
Hi there,

There isn't an equivalend IsDate function in C#

You could use the DateTime.Parse() method. If it throws an exception, its
not a date.

Regards,
--
Noel Hoo
Nov 16 '05 #2
Try this

You have to add reference to Microsoft.VisualBasic in c# project.

string myDate = @"1\1\04";

bool Result = Microsoft.VisualBasic.Information.IsDate(myDate );

--
Shak
(Houston)
"Mike" <no****@nospam.com> wrote in message
news:eR*************@TK2MSFTNGP09.phx.gbl...

Hi,

Anyone knows what the equivalent of the IsDate function is in C#?

Thanks
Mike
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: vonclausowitz | last post by:
Hi All, I use IsDate() to check a field in Outlook tasks to see if it contains a real date. If IsDate(Task.role) then ... else ... endif
0
by: Veeresh | last post by:
I am using ISDate function to determine whether user has entred valid date or not. The below statement returns true. IsDate("12/12") is true & the system interprets this as 12/12/2004. Is...
2
by: John | last post by:
Hi all, How do I use the isDate function? The reason I ask this is because the function returns a false for a date "13/09/2004" which is correct in "dd/MM/yyyy" format. Is there another...
2
by: Oenone | last post by:
I'm having a couple of problems with the IsDate function in VB.net (.net framework v1.1). Having searched the web and usenet for others having the same problem, I've seen several posts from people...
2
by: z. f. | last post by:
Hi, i see in reflector in inner implementation of the Microsoft.VisualBasic.Information.IsDate function that looks like that: public static bool IsDate(object Expression) { if (Expression !=...
6
by: Peter Smith | last post by:
IsDate("01/01") in Vb.Net is returning TRUE. Is it a bug in the function? What is the other way of checking the same functionality? Is there any other know issue with the date function. ..Net 1.1...
19
by: MDC | last post by:
Why does this return true: IsDate("ISometimesHateProgrammingMarch2005") Is there another way to verify that this is not a date?? Thanks in advance! MDC
1
by: nlulla | last post by:
Hi I am trying to get all rows from a datatable where the first column F1 is a date, as this datatable is created of excel, i only want to deal with rows where the first column is having a date in...
4
by: cmrhema | last post by:
Hi, All We have a function called IsDate in Visual Basic that will determine if the given string is date or not. Do we have any such function in C#. Regards cmrhema
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.