|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
After 4 digits i want to put decimal
hi
i m trying to convert a number like 1234546 to 1234.56.meant after 4 digits i want to put decimal.actually i was trying this in xsl.but i not able to find any solution.so what i m thinking is writing a javascript function and call this into mu xsl. thanks shadow pls remove same thread from programming forum.
__________________
Nothing is Impossible bcoz IMPOSSIBLE itself says.. I M POSSIBLE........................ Be cool !!!!!!!!
|
|
#2
|
||||
|
||||
|
I think you have an extra digit in your example. Is the number always going to be 6 digits? Or more likely 3-6, right? In theory, if you treat the number as a string for a moment, it's fairly easy. Something like the following pseudo-code
Code:
tempstr = RIGHT('000000' & CStr(number), 6)
number = CInt(tempstr) / 100
Yeah, that's not JS, but you get the idea.
__________________
Wolffy ------------------------ Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Rework for your specific environment may be required. Void where prohibited by law. Not valid in California. Your mileage may vary. Not FDIC insured |
|
#3
|
||||
|
||||
|
There is no need to do this in JS - Shadow, don't delete the other
thread. I've given you advice on how to do this guddu - if you're not gonna follow it, that's your prerogative.
__________________
Support requests via PM will be ignored! |
|
#4
|
||||
|
||||
|
sorry chief i did not see your reply.pls remove this thread.
|
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > After 4 digits i want to put decimal |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|