Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I want to create a small program which when started checks the date (with vb datetime.now) and from a given date if it is match to play a sound (eg. pseudo code
if datetime.now < DATE(MMDDYY) THEN DO SOMETHING)

THANK YOU
KYRIAKOS
Posted

1 solution

As I undrestood you want something like this:

if ((int)DateTime.Now.ToOADate()==(int)(new DateTime(2012,2,16,0,0,0).ToOADate()) 
{
}



or you can compare one bye one. like:

DateTime d = DateTime.Now;
if (d.Year==2012)
{
}


and other choices.

Sorry I did not remember the casting syntax for vb.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900