0

hello

i want to read 12 values (datetime data type) named s1,s2,s3,s4....,s12 from database.

compare these 12 fields with current date. if difference lies between 10 days i want to show corrosponding result.

please tell me code for this in c#

Edited by vedprakash28: n/a

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by vedprakash28
0

Hello

in principle, it goes that way

select yourData from yourtable
  where datediff (day, s1, now()) <= 10;

Now it's your turn to put some c# code around the sql statement.

You may show your result for further discussions.

-- tesu

Edited by tesuji: n/a

0

Hello

in principle, it goes that way

select yourData from yourtable
  where datediff (day, s1, now()) <= 10;

Now it's your turn to put some c# code around the sql statement.

You may show your result for further discussions.

-- tesu

i want to check date difference between current date and one of the 12 columns named s1,s2,s3,s4,....,s12.

if difference between current date and one of the 12 columns lies between 10 days then i want to show corrosponding result

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.