Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
this is my query and i have tried this.
Select * from TrainMaster where ScheduleDeparture = Convert(varchar(50), Getdate(),108)

What I have tried:

I have tried the above query but it is not getting the time
Posted
Updated 1-Jun-18 23:53pm
Comments
Richard MacCutchan 2-Jun-18 4:48am    
Use DateTime types, not text strings.
Shahbaz435 2-Jun-18 5:20am    
not getting u sir can u plz explain me
Richard MacCutchan 2-Jun-18 5:49am    
Not really, you need to provide more information as to exactly what is happening when you run your code.

1 solution

I have a table called TrainMaster in that table i have 1 column is Schedule departure.
In schedule departure user inserting time and show on the data on grid view.
But i need that is scheduledeparture column time and system time should be matched and that particular time data should be displayed on gridview and when the time is over the next data should be displayed. plz help me for this
 
Share this answer
 
Comments
Richard Deeming 4-Jun-18 10:35am    
If you want to reply to a comment, click the "Reply" button next to that comment.

DO NOT post your reply as a "solution".

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