Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

just showing todays records

Status
Not open for further replies.

balllian

MIS
Jan 26, 2005
150
GB
I need to develop a query which show all updates which have been done each day. i want just to show the current days records. The problem i have been getting is when i put in Date() it returns records from previous years on the same date. Surely this cannot be correct. the date format i'm querying is coming over in the format dd/mm/yyyy hh:mm.

What criteria do i need to enter to just have todays records?

thanks in advance
 
could you post the query you tried so we can see what you mean?
 
WHERE CLng([TimeStamp field])=CLng(Date())

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
SELECT dbo_Trans.Trans_Date, dbo_Client.Appellation1, dbo_Trans.Fund_Code, dbo_Trans.Direction, dbo_Trans.Type, dbo_Trans.Est_Forward_Cost
FROM dbo_Trans INNER JOIN dbo_Client ON dbo_Trans.Client_Code = dbo_Client.Client_Code
WHERE ((Now()>#12/30/1899 12:1:0#) AND ((dbo_Trans.Direction)="S") AND ((dbo_Trans.Type)="S") AND ((dbo_Trans.Client_Code)<>"000001") AND ((dbo_Trans.Cancel_Status)="1"))
ORDER BY dbo_Trans.Est_Forward_Cost DESC;


here is the query. why is the query putting in 12/30/1899 . where i am requiring todays date going forward on a rolling basis.
 
Have you tried this ?
WHERE CLng(dbo_Trans.Trans_Date)=CLng(Date()) AND dbo_Trans.Direction='S' AND dbo_Trans.Type='S' AND dbo_Trans.Client_Code<>'000001' AND dbo_Trans.Cancel_Status='1'


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Leslie
Your Delphi is showing. Date is the function in VB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top