|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Iam trying to concat 2 strings and also i need to insert : [double colon] in between both of them so it looks like time format.
For Example: 1:21 minutes so i need to concat (1:21) like this. I tried using the ampersand (&) in between like <cfset totime = hrtime & : & mintime> It did not work and gave an error message like this: (This message is usually caused by a problem in the expressions structure.) Please Help |
|
#2
|
|||
|
|||
|
Hey sweetmoon,
You have to wrap the colon with quotes. If you want to add anything that's not a declared variable you need it to be surronded in quotes. Code:
<cfset newVal = val1 & ":" & $val2> |
|
#3
|
|||
|
|||
|
Thanks Chimex.
How do i calculate the difference between two variables? Like var3 = var 2 - var1 iam calculating 2 different times and finding out the difference between them. Thanks in advance, SweetMoon. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Cold Fusion Development > String Concat Problem again |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|