|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
how to cut short a string?
<i><b>Originally posted by : kamp (kamph@netease.com)</b></i><br />the string saved by MSSQLserver will has some zeros at it's tail. After i get the string from MSSQLserver, how to cut it into exactly what it is? (i use c#)
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : Raocan (raocan@hotmail.com)</b></i><br />U can use the date function to get the date out of string...<br /><br /><br /><br /><br />------------<br />kamp at 11/12/2000 6:30:11 AM<br /><br />the string saved by MSSQLserver will has some zeros at it's tail. After i get the string from MSSQLserver, how to cut it into exactly what it is? (i use c#)
|
|
#3
|
|||
|
|||
|
<i><b>Originally posted by : kamp (kamph@netease.com)</b></i><br />Can U tell me which data fun exactly? i am just a begginer. i thought it maybe is trim()? but it doesn't work!
|
|
#4
|
|||
|
|||
|
1) When you use C (or a dialect) chances are that you are talking about the string delimiter, ASCII "0". Then you would say
MyData = Left(MyData, Instr(ASC(0)) - 1) 2) When you talk about dates then use Convert(varchar(10), MyDate, 101) Check out online books to get infromed about parameters for this function |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > how to cut short a string? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|