I hv a datetime field named "datejoin" in table "leave".
String sqlleave = "SELECT convert(char(10), datejoin, 121) AS datejoin1 FROM leave WHERE lstaffid=?";
1.RESULT is in yyyy-mm-dd format (eg : 2004-03-30).
How can I format it into dd-mm-yyyy?
2.After this, I have to count the period(how many days) btw "datejoin" and "getDate", which getDATE is current date.
Any IDEA to do this function??? This function no need format the datetime, only run the code to get the number of days.
Please and thanks very much~~