Skip to content

Tag: winforms

C# is adding 00:00:00 unnecessarily

My SQL Server is using the DATE datatype, but my C# app is reading this as ‘mm/dd/yyyy 00:00:00’, can anyone tell me how to get rid of the 0s? (everything else works)…? Answer If you don’t want the time portion of a DateTime as String you have several options: Read: Date and time format strings

How to calculate employees working hours in sql

My company business hour is 7:30 to 18 and 13:00 to 15:00 is lunch time. Important part is about lunch time that should not calculate as working time of employee at all. So imagine employee start working at 8:30 and exit at 15:00 so the time of 4:30 hours should be calculate for him. actually I want to remove lunch

Execute query and populate the same in datagrid Box

I have a winform app connected to access database as data source , but in access i was using this below SQL to generate a query table called trend: But i do not know how execute this & populate the same in datagrid box on form load event(dataset:CSCdataset) , please help me. Answer I guess you can find more information

Drag and Drop not working with external monitor [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question I’m working on a small project for my studies. It’s the first contact with SQL in Visual Studio 2019 Community