Jump to content

How to make a countdown in C# using database values?

i want to make a countdown in c# by taking the ending date from sql server database. so the applications should countdown from the current date to the date in the the database.how can i do this.any suggestions would be very helpful and please dont reply with very advanced ways as im a newbie to C# and sql server.

Link to comment
Share on other sites

Link to post
Share on other sites

Maybe start with a basic project to better understand SQL workflows and C# first?

Quote or tag if you want me to answer! PM me if you are in a real hurry!

Why do Java developers wear glasses? Because they can't C#!

 

My Machines:

The Gaming Rig:

Spoiler

-Processor: i5 6600k @4.6GHz

-Graphics: GTX1060 6GB G1 Gaming

-RAM: 2x8GB HyperX DDR4 2133MHz

-Motherboard: Asus Z170-A

-Cooler: Corsair H100i

-PSU: EVGA 650W 80+bronze

-AOC 1080p ultrawide

My good old laptop:

Spoiler

Lenovo T430

-Processor: i7 3520M

-4GB DDR3 1600MHz

-Graphics: intel iGPU :(

-Not even 1080p

 

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, dany_boy said:

Maybe start with a basic project to better understand SQL workflows and C# first?

i have done some projects like atm systems but this i have no idea.thats why i need a simplified answer for better understanding 

Link to comment
Share on other sites

Link to post
Share on other sites

Well if you already know how to connect and retrieve data from the SQL server, then all you need is to access the current time/data from the computer and compare it to the one from the server. Some simple maths will do the rest. Here is the date/time class reference for C# https://msdn.microsoft.com/en-us/library/system.datetime(v=vs.110).aspx

 

Quote or tag if you want me to answer! PM me if you are in a real hurry!

Why do Java developers wear glasses? Because they can't C#!

 

My Machines:

The Gaming Rig:

Spoiler

-Processor: i5 6600k @4.6GHz

-Graphics: GTX1060 6GB G1 Gaming

-RAM: 2x8GB HyperX DDR4 2133MHz

-Motherboard: Asus Z170-A

-Cooler: Corsair H100i

-PSU: EVGA 650W 80+bronze

-AOC 1080p ultrawide

My good old laptop:

Spoiler

Lenovo T430

-Processor: i7 3520M

-4GB DDR3 1600MHz

-Graphics: intel iGPU :(

-Not even 1080p

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×