devine
08-18-2006, 09:29 AM
Hi All,
I have what appears to be a very common problem when displaying a Time fied in ASP.
The format will always show HH:MM:SS
However, I would like it to only show HH:MM and having read various pages have decided that the following SQL Select statement is the easiest for me to use:
"SELECT *,left(Start, 5) AS Start FROM tblform"
The above code works perfectly for me. (The reason for the * is I need to pull all the fields from the table).
However,I have a START and END field in my table and would like to use the same coding for the END field.
I have tried a few variations and cannot seem to get it right!
So, in summary, I'm looking for the correct way to Start and End and only select the first 5 characters from both.
Below is 1 of the examples which is not working:
"SELECT *,left(Start, 5) AS Start, left(End, 5) AS End FROM tblform"
I have what appears to be a very common problem when displaying a Time fied in ASP.
The format will always show HH:MM:SS
However, I would like it to only show HH:MM and having read various pages have decided that the following SQL Select statement is the easiest for me to use:
"SELECT *,left(Start, 5) AS Start FROM tblform"
The above code works perfectly for me. (The reason for the * is I need to pull all the fields from the table).
However,I have a START and END field in my table and would like to use the same coding for the END field.
I have tried a few variations and cannot seem to get it right!
So, in summary, I'm looking for the correct way to Start and End and only select the first 5 characters from both.
Below is 1 of the examples which is not working:
"SELECT *,left(Start, 5) AS Start, left(End, 5) AS End FROM tblform"