techques
asked on
How to pass string to datetime in a MSSQL query?
Hi
The transactiondatetime (datetime) in the following query is 2009-04-16 16:52:23.000
Now, I need to search only data in April
and the query
select * from transactions where transactiondatetime like '04' //04=April, string
It cannot search the result.
How should I write the query?
The transactiondatetime (datetime) in the following query is 2009-04-16 16:52:23.000
Now, I need to search only data in April
and the query
select * from transactions where transactiondatetime like '04' //04=April, string
It cannot search the result.
How should I write the query?
SELECT [id]
,[transactiontypeid]
,[rate]
,[amount]
,[handlingfee]
,[countervalue]
,[transactiondatetime]
FROM [FungKee].[dbo].[transactions]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
why B ?