Remove .00 from string while conversion
How do i remove .00, .01 from the string while converting that string to int
i tried to do this
Select REPLACE(CONVERT(varchar(15), [Cases], 1), '.00', '') from table
UPDATE table
SET [CASES_d] = CAST(REPLACE(CONVERT(varchar(15), [Cases], 1), '.00', '') AS INT)
I get the error
Conversion failed when converting the varchar value '1.10' to data type int.
can somebody help
Thanks
Sorry, in that code I missed intermediate conversion into decimal(10,2). I forgot we can not convert directly.
So, try:
update table set cases_id = case when cases like '%[^0-9.]%' then 0 else cast(cast(Cases as decimal(10,2)) as int) end
where cases not like '%[^0-9.]%' -- exclude updating bad rows
For every expert, there is an equal and opposite expert. - Becker's Law
My blog
My TechNet articles
Similar Messages
-
My ipad was stolen tonight and I accidently removed it from Icloud while trying to erase the data. Is there any way to remotley restore Icloud? Or am I just out of luck?
If they turn off iCloud in settings, is it a lost cause? My bad for not having it secured with password. Thanks for the help. I'm exhausted and going to bed in a few. Five hundred miles from home on bussines trip. Flying home in the morning. sitting in hotel loby trying to figure this out. thanks again
-
Remove "&" charachter from string
Hi,
Please inform me how can i remove the & from string.
i try this but not working.
SELECT REGEXP_REPLACE(’raise the level of &performance, creativity',’&','') COL1 FROM DUAL;
Also i want to remove any special character from statement.
many thanksAyham wrote:
i try this but not working.
SELECT REGEXP_REPLACE(’raise the level of &performance, creativity',’&','') COL1 FROM DUAL;Are you getting any error?
SQL> set define off
SQL> SELECT REPLACE('raise the level of &performance, creativity','&') COL1
2 FROM DUAL;
COL1
raise the level of performance, creativity>
Also i want to remove any special character from statement.
Search the forum..
Sample:Re: How to find Special Characters in a single query
Edited by: jeneesh on Sep 17, 2012 12:26 PM -
I am trying to remove unwanted from a string. For example:
String is "boy the movie part 2 (2009)". from this string i wanted to remove "(2009)" only, so my string can be looked like as "boy the movie part 2".
Please provide me logic to do this.
Thanks,
Amolgimbal2 wrote:
Hey if that's all you need:
[snip]
Just substring minus the last six characters and to not have to make any assumptions about whitespace being present in the result, a trim() is added for the fun of it.
This is absolutely not fail proof, but it does what you ask.@OP: Most likely this is not what you really want. However, as gimbal2 points out, it does what you ask. The lesson is, you need to be clear and precise in expressing your requirements. To drive the point home, here is some more code that does what you asked for, but probably not what you really want it do do.
if (str.equals("boy the movie part 2 (2009)") {
str = "boy the movie part 2";
} -
Best way to remove apostrophe from string when loadiing
Hi using an insert statement to load data some apostrophe's in string .
We need to ensure all aposrophe's removed from such strings on loading/.
What is best way to achive ethis.
Uisng 11.2.0.3
ThanksUse replace fucntion
Please post ur DDL and DML for the table
For examples you can see this
how do i replace single quotes in a string with say '' or null
select replace('ab''''''''cd','''',' ') from dual;
CREATE TABLE my_table
istrng varchar2(33)
insert into my_table
select replace('ab''''''''cd','''',' ') from dual;Please mark your questions as answered
user5716448
Handle: user5716448
Status Level: Newbie
Registered: Mar 16, 2010
Total Posts: 343
Total Questions: 131 (80 unresolved)Edited by: Rahul India on Jan 29, 2013 6:04 PM -
Removing comma (,) from string
Hello Friends,
I have a string something of this nature
Sting : ',3456,45454,,45454,'
Need to have just comma seperated value : '3456,45454,45454'
Tried with replace but getting - '34564545445454'
select replace ( ltrim(RTRIM(replace(',3456,45454,,45454,', ',,', ','),',')),',', '') from dual;
Appreciate your help .
Thanks/KumarHi, Kumar,
kumar73 wrote:
Hello Friends,
I have a string something of this nature
Sting : ',3456,45454,,45454,'
Need to have just comma seperated value : '3456,45454,45454'
Tried with replace but getting - '34564545445454'
select replace ( ltrim(RTRIM(replace(',3456,45454,,45454,', ',,', ','),',')),',', '') from dual;Do you want to remove ','s at the beginning of the string, but leave them in the other places?
If so:
LTRIM (string, ',')LTRIM removes the given character(s) from the <b>L</b>eft side (that is, the beginning) of string. That's all you want here. (Was your string generated by SYS_CONNECT_BY_PATH? This is a very common problem.)
RTRIM removes the given character(s) from the <b>R</b>ight side (that is, the end) of string. I don't think you want that; you certainly don;'t need it in the example you gave.
REPLACE removes the given characters anywhere in the string. You definitely don't want that. If you did, there would be no point in also using LTRIM or RTRIM. -
Removing characters from string after a certain point
Im very new to java programming, so if this is a realy stupid question, please forgive me
I want to remove all the characters in my string that are after a certain character, such as a backslash. eg: if i have string called "myString" and it contains this:
109072\We Are The Champions\GEMINI
205305\We Are The Champions\Queen
4416\We Are The Champions\A Knight's Tale
a00022723\We Are The Champions\GREEN DAYi would like to remove all the characters after the first slash (109072*\*We...) leaving the string as "109072"
the main problem is that the number of characters before and after is not the always the same, and there is often letters in the string i want, so it cant be separated by removing all letters and leaving the numbers
Is there any way that this can be done?
Thanks in advance for all help.You must learn to use the Javadoc for the standard classes. You can download it or reference it on line. For example [http://java.sun.com/javase/6/docs/api/java/lang/String.html|http://java.sun.com/javase/6/docs/api/java/lang/String.html].
-
How to Remove Text From Strings ?
Hi,
The question I have is, in the String that I have Pasted below, how can I remove the first line (>gi|23821530|dbj||SEG_D10989S Bos taurus gene for endothelin receptor) and then use the remainder of the text to Post to a web server?
I have tried doing this with a Regex (Pattern P = Pattern.compile("(^>.*)");), I'm able to capture the first line of text, but am not sure how to remove it and then use the rest of the text to Post to the web server.
Any Help with this would be much appreciated
gi|23821530|dbj||SEG_D10989S Bos taurus gene for endothelin receptorGGGATCCCGAGCAAACTGCGGAGGCCACACTGTCAGGCATTCCCTCGGCGTTTCGTCAGAGCCAGACCCT
CCCGCTGCTGAAGGGAGGCGCGCTCTGCTCCCGGGCTGCCGGGAACCCAGCCGCGCGCCGGGGAAGGAGG
TCCCTGCCTGGTGCGTCCGGACCAAGAGGTAACCGTTCTGCTTGGTGTTTAATTCAAATCTGTGATTGAA
CCTTATCCTGGGGCTTCAGTTTGGATTACTTCTTAGGTTTGTTTTTGTTTGTTTGTTTGTTTTTTAACCT
GTAGCTACAGCAGATTAAAATGGGATTGGAGTGAAGGAGAGGGCTTGAGTGTCTGAAGTCACTCGAAGGG
GATAGAAACTTCCGAGTTAATCCAGATAGAGACTCTTCCAAATAGACCAAGTGGAGATGTCCGGGAGATT
TTCCGAGTCAGCCGGCTCAGTCCTGGGGTGTGTGTATGGGGGGTGGGGGCGGTGCCGAAGAGCGGAAGGA
AGGGGTCTGAAAGTCCAGACATGCGGCATCCGGGGTTGCTGTGGAGTCGAAAGCAGAGACTGGCGATGCC
CTTGATCTCTAACCTGCCTTGATTTGCCCCGTCCCCGCGCGCCCTTGGCCAGAACGAATACTGCTCCCTC
TGCGCACACCAGGAGCTCAAAGCTTTGCTTTGGACACCCGTCCTCTCCTCCCCGTCACACCCCTTCCAGGString foo = "gi|23821530|dbj||SEG_D10989S Bos taurus
gene for endothelin receptor";
String totalString = "gi|23821530|dbj||SEG_D10989S Bos
taurus gene for endothelin receptor
GGGATCCCGAGCAAACTGCGGAGGCCACACTGTCAGGCATTCCCTCGGCGTTTCG
CAGAGCCAGACCCT
CCCGCTGCTGAAGGGAGGCGCGCTCTGCTCCCGGGCTGCCGGGAACCCAGCCGCG
GCCGGGGAAGGAGG
TCCCTGCCTGGTGCGTCCGGACCAAGAGGTAACCGTTCTGCTTGGTGTTTAATTC
AATCTGTGATTGAA
CCTTATCCTGGGGCTTCAGTTTGGATTACTTCTTAGGTTTGTTTTTGTTTGTTTG
TTGTTTTTTAACCT
GTAGCTACAGCAGATTAAAATGGGATTGGAGTGAAGGAGAGGGCTTGAGTGTCTG
AGTCACTCGAAGGG
GATAGAAACTTCCGAGTTAATCCAGATAGAGACTCTTCCAAATAGACCAAGTGGA
ATGTCCGGGAGATT
TTCCGAGTCAGCCGGCTCAGTCCTGGGGTGTGTGTATGGGGGGTGGGGGCGGTGC
GAAGAGCGGAAGGA
AGGGGTCTGAAAGTCCAGACATGCGGCATCCGGGGTTGCTGTGGAGTCGAAAGCA
AGACTGGCGATGCC
CTTGATCTCTAACCTGCCTTGATTTGCCCCGTCCCCGCGCGCCCTTGGCCAGAAC
AATACTGCTCCCTC
TGCGCACACCAGGAGCTCAAAGCTTTGCTTTGGACACCCGTCCTCTCCTCCCCGT
ACACCCCTTCCAGG";
int position = -1;
int lenght = -1;
position = totalString.indexOf(foo) + foo.length();
String processedString =
totalString.substring(position);
Thanks for the post,
Did the job perfectly!
cheers again -
Removing anchors from FrameMaker HTML conversion
After converting a FrameMaker document into an HTML site, I'm left with an anchor (marker) for nearly every single element on every HTML page: paragraph, list, heading, etc. Besides the code bloat, it makes viewing and working with pages in GoLive difficult.
Is there a way to remove all these anchors in bulk from the HTML? Search-and-replace doesn't work in the usual sense, because every anchor has a unique numerical value. Some sort of script? Third-party tool? Any help would be appreciated.
Thanks,
KarenGood going, Nate!<br /><br />Process in Dreamweaver would be nearly identical.<br /><br />-- <br />Murray<br /><br /><br /><[email protected]> wrote in message <br />news:[email protected]..<br />> If you're already working in GoLive CS2, may as well fix it in that. Here <br />> are the steps:<br />><br />> 1. Make a back-up of your file (in case something doesn't get entered or <br />> processed correctly).<br />> 2. With your file opened, go to Edit > Find > Find Code Elements<br />> 3. for Element, choose "Is" and "a" for anchor elements.<br />> 4. for Attribute, choose "name" and "Matches Reg. Expr." and enter this <br />> pattern in the field:<br />> 50532357_.*<br />> ...to tell it to search for any name attribute starting with "50532357_" <br />> (the . means any other character, the * means any number of other <br />> characters).<br />> 5. expand the area below for Change, and under Element choose "Replace by <br />> its content" so it strips out the element only.<br />> 6. hit the Apply to All button to find and replace all.<br />><br />> Here's a screen shot of the settings:<br />> <a href=http://www.mindpalette.com/remote_images/FindCodeElements.png>
-
hey
I've a string like "1 2 3 4" and i want to filter the tabs, the requested result is : "1234"
I was wondering if there any easy way (some String method ?) that i can use
Thanksigalep132 wrote:
thanks for quick answer
it's not what i need...
eventually i need one string like "1234", without empty sringsCute; how many characters does the String "abcd" contain? Four? Nope, there are a kazillion empty strings between each character, you just can't see them ;-)
kind regards,
Jos -
Remove tokens from string and sort string via XSLT mapping
Hi,
I have a requirement wherein I need to sort the records in an XML file with customer num & order number.
The value of order number is concatenation of order and item like: 3249_110 , 3249_10, 3290_110,3290_10 and so on.
Expected result:
3249_10
3249_110
3290_10
3290_110
The sort on order number is not giving correct result as its not considering it as an number and the output I am getting is:
3249_110
3249_10
3290_110
3290_10
code used:
<xsl:for-each select="DELIVERYHEADER">
<xsl:sort select="./EXTCUSTOMERNO"/>
<xsl:sort data-type="number" order="ascending" select="/EXTORDERNO"/>
<xsl:copy-of select=".">
</xsl:copy-of>
Please suggest.
Thanks!
Indu KhuranaSource:
<?xml version="1.0" encoding="ISO-8859-1"?>
<ORIONSHIPMENTS>
<TRIP>
<ACTION>I</ACTION>
<SHIFTNO>1</SHIFTNO>
<SEQUENCENO>1</SEQUENCENO>
<DATE>2010-12-20 00:00:00</DATE>
<STARTDATE>2010-12-20 06:00:00</STARTDATE>
<ENDDATE>2010-12-20 14:54:00</ENDDATE>
<TRIPNO>10</TRIPNO>
<TRIPMNEMONIC/>
<DRIVERID>DRIVERORT2</DRIVERID>
<DRIVERNO>DRIVERORT2</DRIVERNO>
<EXTDRIVERNO>12345</EXTDRIVERNO>
<TRUCKID>Truck 01</TRUCKID>
<TRUCKNO>Truck 01</TRUCKNO>
<EXTTRUCKNO>5002053</EXTTRUCKNO>
<TRAILERID>Trailer 2</TRAILERID>
<TRAILERNO>Trailer 2</TRAILERNO>
<EXTTRAILERNO>ORTEC00002</EXTTRAILERNO>
<DELIVERYCT>2</DELIVERYCT>
<LOADCT>1</LOADCT>
<STARTDEPOTNO>GHENT_N</STARTDEPOTNO>
<EXTSTARTDEPOTNO>4020</EXTSTARTDEPOTNO>
<ENDDEPOTNO>GHENT_N</ENDDEPOTNO>
<EXTENDDEPOTNO>4020</EXTENDDEPOTNO>
<STARTLOCATIONNO>GHENT_N</STARTLOCATIONNO>
<EXTSTARTLOCATIONNO>4020</EXTSTARTLOCATIONNO>
<ENDLOCATIONNO>GHENT_N</ENDLOCATIONNO>
<EXTENDLOCATIONNO/>
<ANCILLARYTIME>0</ANCILLARYTIME>
<LOADINGTIME>0</LOADINGTIME>
<DISCHARGETIME>245</DISCHARGETIME>
<DRIVETIME>289</DRIVETIME>
<DISTANCE>0</DISTANCE>
<LOADINGSTARTED>0</LOADINGSTARTED>
<COMMENT/>
<LOAD>
<ACTION>I</ACTION>
<LOADID />
<LOADIDADD />
<SEQUENCENO>0</SEQUENCENO>
<LOADINGDEPOTNO>GHENT_N</LOADINGDEPOTNO>
<EXTLOADINGDEPOTNO>4020</EXTLOADINGDEPOTNO>
<LOADINGPOINT />
<AUTHORISATIONCODE />
<COMPARTMENTTO>
<COMPARTMENTNO>1</COMPARTMENTNO>
<PRODUCTNO>401611</PRODUCTNO>
<EXTPRODUCTNO>000000000000401611</EXTPRODUCTNO>
<VOLUME>65</VOLUME>
<UOM>LT</UOM>
</COMPARTMENTTO>
</LOAD>
<DELIVERYHEADER>
<ACTION>I</ACTION>
<SEQUENCENO>1</SEQUENCENO>
<ORDERNO>3949_20</ORDERNO>
<EXTORDERNO>3949_201</EXTORDERNO>
<CUSTORDERNO>01.01 Crea</CUSTORDERNO>
<CUSTOMERNO>0050000001</CUSTOMERNO>
<EXTCUSTOMERNO>0050000001</EXTCUSTOMERNO>
<DELIVERYNAME>TEST ORTEC</DELIVERYNAME>
<DELIVERYADDRESS1>Rue de Belgique</DELIVERYADDRESS1>
<DELIVERYADDRESS2/>
<DELIVERYADDRESS3/>
<DELIVERYPOSTCODE/>
<DELIVERYTOWN/>
<DELIVERYCOUNTRY>BE</DELIVERYCOUNTRY>
<INVOICENAME/>
<INVOICEADDRESS1/>
<INVOICEADDRESS2/>
<INVOICEADDRESS3/>
<INVOICEPOSTCODE/>
<INVOICETOWN/>
<INVOICECOUNTRY/>
<PHONENUMBER1/>
<PHONENUMBER2>0</PHONENUMBER2>
<TAXCODE />
<CUSTOMERCOMMENTS>0013</CUSTOMERCOMMENTS>
<DELIVERYCOMMENTS/>
<DOCUMENTTYPE>2</DOCUMENTTYPE>
<DELIVERYWINDOWSTARTDATE>2010-12-20 00:00:00</DELIVERYWINDOWSTARTDATE>
<DELIVERYWINDOWENDDATE>2010-12-20 23:59:00</DELIVERYWINDOWENDDATE>
<DELIVERYLINECT>1</DELIVERYLINECT>
<DELIVERYAUTHORISATIONREQUIRED/>
<CUSTOMERLANGUAGE/>
<CONTACTNAME/>
<COMPANYREFERENCE/>
<CUSTOMERTAXNO/>
<FISCALDELIVERY>0</FISCALDELIVERY>
<PAYMENTMETHOD>0</PAYMENTMETHOD>
<PAYMENTDAYSDUE>999</PAYMENTDAYSDUE>
<CURRENCY/>
<CALLBEFOREDELIVERY>0</CALLBEFOREDELIVERY>
<GEOFENCEDISTANCE>0</GEOFENCEDISTANCE>
<GEOFENCEPHONE/>
<SITEACCESSGRADE/>
<NORMALTAXRATE/>
<SPECIALTAXRATE>0</SPECIALTAXRATE>
<DISCOUNT>0</DISCOUNT>
<SIGNATURECAPTURED/>
<DISTANCELOADINGDEPOT>184</DISTANCELOADINGDEPOT>
<DRIVETIMELOADINGDEPOT>145</DRIVETIMELOADINGDEPOT>
<DISTANCENEXTSTOP>0</DISTANCENEXTSTOP>
<DRIVETIMENEXTSTOP>0</DRIVETIMENEXTSTOP>
<LOADRELEVANT/>
<DELIVERYLINE>
<ACTION>I</ACTION>
<MOVEMENTNO>3949_20001</MOVEMENTNO>
<EXTMOVEMENTNO>3949_20</EXTMOVEMENTNO>
<PRODUCTNO>401611</PRODUCTNO>
<EXTPRODUCTNO>000000000000401611</EXTPRODUCTNO>
<PLANNEDQTY>20</PLANNEDQTY>
<UOM>LT</UOM>
<PRICEPERUNIT/>
<DISCOUNT/>
<COMMENTS/>
<COMPARTMENTFROM>
<COMPARTMENTNO>1</COMPARTMENTNO>
<VOLUME>0</VOLUME>
<TANKNO>1</TANKNO>
<EXTTANKNO>1</EXTTANKNO>
<TANKID>259454</TANKID>
<TANKLABEL/>
<PRODUCTNO>401611</PRODUCTNO>
<EXTPRODUCTNO>000000000000401611</EXTPRODUCTNO>
<UOM>LT</UOM>
</COMPARTMENTFROM>
</DELIVERYLINE>
</DELIVERYHEADER>
<DELIVERYHEADER>
<ACTION>I</ACTION>
<SEQUENCENO>2</SEQUENCENO>
<ORDERNO>3949_110</ORDERNO>
<EXTORDERNO>3949_110</EXTORDERNO>
<CUSTORDERNO>01.01 Crea</CUSTORDERNO>
<CUSTOMERNO>0050000001</CUSTOMERNO>
<EXTCUSTOMERNO>0050000001</EXTCUSTOMERNO>
<DELIVERYNAME>TEST ORTEC</DELIVERYNAME>
<DELIVERYADDRESS1>Rue de Belgique</DELIVERYADDRESS1>
<DELIVERYADDRESS2/>
<DELIVERYADDRESS3/>
<DELIVERYPOSTCODE/>
<DELIVERYTOWN/>
<DELIVERYCOUNTRY>BE</DELIVERYCOUNTRY>
<INVOICENAME/>
<INVOICEADDRESS1/>
<INVOICEADDRESS2/>
<INVOICEADDRESS3/>
<INVOICEPOSTCODE/>
<INVOICETOWN/>
<INVOICECOUNTRY/>
<PHONENUMBER1/>
<PHONENUMBER2>0</PHONENUMBER2>
<TAXCODE />
<CUSTOMERCOMMENTS>0013</CUSTOMERCOMMENTS>
<DELIVERYCOMMENTS/>
<DOCUMENTTYPE>2</DOCUMENTTYPE>
<DELIVERYWINDOWSTARTDATE>2010-12-20 00:00:00</DELIVERYWINDOWSTARTDATE>
<DELIVERYWINDOWENDDATE>2010-12-20 23:59:00</DELIVERYWINDOWENDDATE>
<DELIVERYLINECT>1</DELIVERYLINECT>
<DELIVERYAUTHORISATIONREQUIRED/>
<CUSTOMERLANGUAGE/>
<CONTACTNAME/>
<COMPANYREFERENCE/>
<CUSTOMERTAXNO/>
<FISCALDELIVERY>0</FISCALDELIVERY>
<PAYMENTMETHOD>0</PAYMENTMETHOD>
<PAYMENTDAYSDUE>999</PAYMENTDAYSDUE>
<CURRENCY/>
<CALLBEFOREDELIVERY>0</CALLBEFOREDELIVERY>
<GEOFENCEDISTANCE>0</GEOFENCEDISTANCE>
<GEOFENCEPHONE/>
<SITEACCESSGRADE/>
<NORMALTAXRATE/>
<SPECIALTAXRATE>0</SPECIALTAXRATE>
<DISCOUNT>0</DISCOUNT>
<SIGNATURECAPTURED/>
<DISTANCELOADINGDEPOT>184</DISTANCELOADINGDEPOT>
<DRIVETIMELOADINGDEPOT>145</DRIVETIMELOADINGDEPOT>
<DISTANCENEXTSTOP>173</DISTANCENEXTSTOP>
<DRIVETIMENEXTSTOP>144</DRIVETIMENEXTSTOP>
<LOADRELEVANT/>
<DELIVERYLINE>
<ACTION>I</ACTION>
<MOVEMENTNO>3949_110001</MOVEMENTNO>
<EXTMOVEMENTNO>3949_110</EXTMOVEMENTNO>
<PRODUCTNO>401611</PRODUCTNO>
<EXTPRODUCTNO>000000000000401611</EXTPRODUCTNO>
<PLANNEDQTY>45</PLANNEDQTY>
<UOM>LT</UOM>
<PRICEPERUNIT/>
<DISCOUNT/>
<COMMENTS/>
<COMPARTMENTFROM>
<COMPARTMENTNO>1</COMPARTMENTNO>
<VOLUME>0</VOLUME>
<TANKNO>1</TANKNO>
<EXTTANKNO>1</EXTTANKNO>
<TANKID>259454</TANKID>
<TANKLABEL/>
<PRODUCTNO>401611</PRODUCTNO>
<EXTPRODUCTNO>000000000000401611</EXTPRODUCTNO>
<UOM>LT</UOM>
</COMPARTMENTFROM>
</DELIVERYLINE>
</DELIVERYHEADER>
</TRIP>
</ORIONSHIPMENTS> -
How to remove the comma from string
Hi,
I Have string like below :
String some1="123,44.22";
I want to remove comma from string and final output should be 12244.22.
public class getOut{
public static void main(String args[]){
String some1="123,44.22";
getChars(int 0,some1.length(),char[] dst,0);
can somebody in the forum give me idea how to remove comma from the String and
have a string without comma.
Thanks
Jackint idx = oldString.indexOf(',');
if(idx >= 0)
newString = oldString.substring(0, idx) + oldString.substring(idx + 1);or for jdk 1.4 and later
str = str.replaceAll(",", ""); -
Help :how to remove spaces in string
could any body please help me in removing spaces from string suppose i have written vivek chhabra and i want to remove spaces in this string and want a string vivekchhabra then how this could be done
anybody help me please
vivekString string = "Hello - This is a test!";
String result = string.replaceAll(" ", "");
System.out.println(result);This code results the following output:
Hello-Thisisatest! -
Wrong use of "Scan From String" function in a while loop?
Hi,
I've got a "Scan From String" function inside a while loop. On the first iteration it converts correctly the number passed by the input string (for example 4) But on the second one it has only spaces (one or more \s) as input string.
I expected to obtain a zero as output (as it does always that it can not make any conversions, as I am supposed to) but indeed, i subtracts 1 from the previous number (according to the number indicated as example I would obtain a 3 as output)
What's wrong with this?
Does the function fails on this case?
The rest of the diagram o the VI is expected to manage a 0 on that situation, like others in which the conversion is not made.
Andres.I have simplified the VI evading calls to other VIs and trying to reproduce the mistake.
The type of string I introduce to reproduce the mistake is:
clock 3 (30) clock (40)
Forgetting to introduce a number between the second "clock" and the following parenthesis, I would manage it programmatically with code that isn't included.
Then "Scan From String" is supposed to do not make a conversion. But it leaves a 2 as output (in this example)
I have realised, unbelievable but true, that it has matter with the number I substract to the output number (if it were 2, I would obtain 1 as output and so on)
Excluding that, I got the conversion made before as output, 3, on the second time that "Scan From String" executes. But, how can this func
tion as bad?
I am using LV4 on an old PC. I have tried to reproduce it with LV6 and it works. But it isn't desirable for me, I would have to convert a lot of VIs and surely I will find a lot of errors due to the conversion (I have already tried)
Attachments:
EXTCLOCK.VI 26 KB -
Conversion from string "20041023 " to type 'Date' is not valid.
Hi ,
I have a table with one of the column(EmpHiredate) datatype is char(10). It has value like "20141023". I need to display this value as date format(dd/mm/yyyy) in report.
Following methods i tried in textbox expression but no luck.
=Format(Fields!EmpHireDate.Value,"dd/MM/yyyy")
=Cdate(Fields!EmpHireDate.Value)
Error:
[rsRuntimeErrorInExpression] The Value expression for the textrun ‘EmpHireDate.Paragraphs[0].TextRuns[0]’ contains an error: Conversion from string "20041023 " to type 'Date' is not valid.
Is it possible to convert string to date using SSRS textbox expression ? Can anyone help me with the solution.
Thanks,
KittuHi Jmcmullen,
Found one more issue on the same. I have one value like "00000000" for the column(EmpHiredate)
, when i use above expression values(ex:"20141023")
are displaying in dd/MM/yyyy format in report except value like "00000000" and giving following error:
[rsRuntimeErrorInExpression] The Value expression for the textrun ‘EmpHireDate.Paragraphs[0].TextRuns[0]’ contains an error: Conversion from string "0000/00/00" to type 'Date' is not valid.
Even i tried to pass its original value("00000000") as below but no luck.
=IIF(Fields!EmpHireDate.Value = "00000000","00000000",Format(CDATE(MID(Fields!EmpHireDate.Value,1,4) + "/" + MID(Fields!EmpHireDate.Value,5,2) + "/" + MID(Fields!EmpHireDate.Value,7,2)),"dd/MM/yyyy"))
Also tried this:
=IIF(Fields!EmpHireDate.Value = "00000000","2000/10/21",Format(CDATE(MID(Fields!EmpHireDate.Value,1,4) + "/" + MID(Fields!EmpHireDate.Value,5,2) + "/" + MID(Fields!EmpHireDate.Value,7,2)),"dd/MM/yyyy"))
Please Suggest.
Thanks ,
Kittu
Maybe you are looking for
-
How to change page template for a single page?
I create a new document based on the Pages "Reports > Business Report". Now the first page is formatted as a "Cover" page with a larger top margin. Via "Format > Advanced > Manage Pages..." I see there are what I assume are the "Page Templates": - Co
-
[Solved] Playing movie on external monitor gives me a blue screen
Nevermind. I found the xvattr package in the AUR. I've tried this on both VLC and Mplayer and everytime the movie starts I see blue instead. On the built in monitor for my laptop the DVD is viewable. To get tv-out I use this command: xrandr --outp
-
Upload Directory Configuration Problem in jdev 10.1.3.2 adfbc
I am configuring a file upload utiltity. By default my files are created in /tmp directory i.e on c:\tmp folder. I intend to change this behaviour as i want this to be uplaoded into a drive other than c:\ When we define the upload directory i have sp
-
when i connect my iphone 4s into the usb on my laptop it isnt being recognised by the laptop/itunes and isnt even charging. it used to work but for some reason wont now and i have tried two different usb leads??
-
Mp4 in ipod classic 30 GB works perfectly while in ipod classic 80 GB no !
I've just bought a new ipod classic 80 GB, but all mp4 videos that worked with my 30 GB ipod now play for a time and randomly reset my new ipod. Any ideas ?