sql limit date time only jan my sql

SELECT `sellhead`.TrnDate, `sellhead`.InvoiceNo, `sellhead`.CName, `sellhead`.
       VatAmt, `sellhead`.NetAmt
  FROM AOL.sellhead `sellhead`
 WHERE (`sellhead`.InvoiceNo LIKE '00%')

How can  I select only TrnDate that only in Jan     the for mat   TrnDate is  datetime
CREATE TABLE `sellhead` (
  `Branch` varchar(3) NOT NULL DEFAULT '0',
  `Code` double NOT NULL DEFAULT '0',
  `TrnDate` datetime DEFAULT NULL,
  `TType` char(1) NOT NULL DEFAULT 'A',
  `AccTp` ENUM('R','C','Q','D') NOT NULL DEFAULT 'R',
  `DocType` ENUM('I','D') NOT NULL DEFAULT 'D',
  `InvoiceNo` varchar(10) DEFAULT NULL,
  `DocNo` varchar(10) DEFAULT NULL,
  `InvoiceDate` datetime DEFAULT NULL,
  `BackNo` varchar(10) DEFAULT NULL,
  `Reference` varchar(15) DEFAULT NULL,
  `cid` double NOT NULL DEFAULT '0',
  `CName` varchar(100) DEFAULT NULL,
  `Adr1` varchar(40) DEFAULT NULL,
  `Adr2` varchar(40) DEFAULT NULL,
  `Address` text,
  `Zip` varchar(5) DEFAULT NULL,
  `DueDate` date NOT NULL DEFAULT '0000-00-00',
  `SCode` varchar(6) DEFAULT NULL,
  `Amount` double NOT NULL DEFAULT '0',
  `SpDiscount` double NOT NULL DEFAULT '0',
  `TotAmt` double NOT NULL DEFAULT '0',
  `TaxType` ENUM('E','I','N') NOT NULL DEFAULT 'E',
  `Vat` double NOT NULL DEFAULT '0',
  `VatAmt` double NOT NULL DEFAULT '0',
  `NetAmt` double NOT NULL DEFAULT '0',
  `RcvAmt` double DEFAULT NULL,
  `RealRcvAmt` double NOT NULL DEFAULT '0',
  `Remark` varchar(50) DEFAULT NULL,
  `BankCode` varchar(4) DEFAULT NULL,
  `ChqNo` varchar(15) DEFAULT NULL,
  `ChqDate` date DEFAULT NULL,
  `CreditCard` varchar(4) DEFAULT NULL,
  `CardNo` varchar(16) DEFAULT NULL,
  `CardExp` varchar(5) DEFAULT '  /',
  `Status` char(1) DEFAULT NULL,
  `ToAR` ENUM('Y','N') NOT NULL DEFAULT 'N',
  `UID` varchar(10) DEFAULT NULL,
  `UDT` datetime DEFAULT NULL,
  `PayDate` datetime DEFAULT NULL,
  `cancel_b` ENUM('Y','N') NOT NULL DEFAULT 'N',
  `canStaff` varchar(12) DEFAULT NULL,
  `canDate` datetime DEFAULT NULL,
  `CommCutOff` char(1) NOT NULL DEFAULT 'N',
  PRIMARY KEY  (`Code`),
  KEY `cancel_b` (`cancel_b`),
  KEY `UDT` (`UDT`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Transaction Header';

Open in new window

teeraAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bobbit31Commented:
Hello winklez,

where Month(TrnDate) = 1

Regards,

bobbit31
0
teeraAuthor Commented:
Thank you very much :bobbit31

But it collect  jan of 2004 to jan 2008   I want only  Jan 2008 How can I do that
0
ee_rleeCommented:
hi, try this

where (Month(TrnDate) = 1 AND Year(TrnDate)=2008)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.