hello, i want to ask how to show the status by compare the current date with the data that in the database by using the VB.net and i'm using the SQL server for the database.. such as
if date in database < current date
..Status = OK
if date in database > current date
..status = Over due
please give me some guideline to resolve this problem..
How to show the date over due using VB,net
Page 1 of 13 Replies - 1515 Views - Last Post: 19 March 2010 - 06:57 AM
Replies To: How to show the date over due using VB,net
#2
Re: How to show the date over due using VB,net
Posted 19 March 2010 - 04:28 AM
Well you didn't supply any code so I'm assuming you can pull the date from the database.
So the only information I can give you is that you can use Date.Now for the current date.
So
So the only information I can give you is that you can use Date.Now for the current date.
So
If cDate(date in database) < date.now then ..Status = OK End If
#3
Re: How to show the date over due using VB,net
Posted 19 March 2010 - 06:27 AM
I am using the binding source to connect the data with the form. How can i generate it for different user? Such as i have a several data from admin;
example output:
Student Name : David
Due date of borrowed book : 3/30/2010
Status : OK
Student Name : Cristina
Due date of borrowed book : 1/1/2010
Status : Date Over due.Please return the book.
:
:
:
...
my problem is the date that i used in data binding is type of DateTimePicker, can it compare to Data.Now? and i also want the status will be automatic changes the status when the date over due.
example output:
Student Name : David
Due date of borrowed book : 3/30/2010
Status : OK
Student Name : Cristina
Due date of borrowed book : 1/1/2010
Status : Date Over due.Please return the book.
:
:
:
...
my problem is the date that i used in data binding is type of DateTimePicker, can it compare to Data.Now? and i also want the status will be automatic changes the status when the date over due.
#4
Re: How to show the date over due using VB,net
Posted 19 March 2010 - 06:57 AM
what did you mean by "(date in database)"..its like
If CDate(TarikhTamatCukaiJalan in Sistem_Pengesanan_Tamat_Tempoh_Cukai_JalanP_RFID.xsd) < Date.Now Then
TxtStatus.Text = "OK"
End If
but it has an error..can u help me?
If CDate(TarikhTamatCukaiJalan in Sistem_Pengesanan_Tamat_Tempoh_Cukai_JalanP_RFID.xsd) < Date.Now Then
TxtStatus.Text = "OK"
End If
but it has an error..can u help me?
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|