How to convert character value to_date?
I want to change the time (hours) in sysdate to '10' and then save this new date into a date column for that i've written the following command
(TO_CHAR(SYSDATE,'DD-MON-RRRR')||' 10:'||TO_CHAR(SYSDATE,'MI:SS AM'))this command will remove the actual hours in sysdate and change it with the value '10'. but the result of this command is a character value. and i want a date value to insert into a date column. for that i've converted this command to_date as follows
TO_DATE(TO_CHAR(SYSDATE,'DD-MON-RRRR')||' 10:'||TO_CHAR(SYSDATE,'MI:SS AM'))but it gives the following error
ORA-01830: date format picture ends before converting entire input string
how to do this?
Gul wrote:
I want to change the time (hours) in sysdate to '10' and then save this new date into a date column for that i've written the following command
(TO_CHAR(SYSDATE,'DD-MON-RRRR')||' 10:'||TO_CHAR(SYSDATE,'MI:SS AM'))this command will remove the actual hours in sysdate and change it with the value '10'. but the result of this command is a character value. and i want a date value to insert into a date column. for that i've converted this command to_date as follows
TO_DATE(TO_CHAR(SYSDATE,'DD-MON-RRRR')||' 10:'||TO_CHAR(SYSDATE,'MI:SS AM'))but it gives the following error
ORA-01830: date format picture ends before converting entire input string
how to do this?TO_DATE(TO_CHAR(SYSDATE,'DD-MON-YYYY')||' 10:'||TO_CHAR(SYSDATE,'MI:SS AM'),'DD-MON-YYYY HH:MI:SS AM')
Similar Messages
-
How to convert character into numeric
Pls suggest me how to convert character value into numeric value.
If you are looking for some FM then
USE
CALL FUNCTION 'CHAR_NUMC_CONVERSION'
EXPORTING
INPUT = 0
IMPORTING
NUMCSTR =
or use
Sample code below:
codeDATA: lv_chr(4) type c,
lv_num type p.
CALL FUNCTION 'MOVE_CHAR_TO_NUM'
EXPORTING
CHR = lv_chr
IMPORTING
NUM = lv_num
EXCEPTIONS
CONVT_NO_NUMBER = 1
CONVT_OVERFLOW = 2
OTHERS = 3.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.[/code]
or USE
CONVERT_STRING_TO_INTEGER
or USE THESE FMs
MOVE_CHAR_TO_NUM
C14W_CHAR_NUMBER_CONVERSION
CHAR_NUMC_CONVERSION
reward if helpful -
Can u tell me how to convert int value in to string
hi to all, can u tell me how to convert int value in to string.
hi to all, can u tell me how to convert int value in
to string.Even this way:
int number = 155;
String mystring = ""+155;
[\code] -
How 2 convert numeric value to character value?
Hi friends,
I want to convert numeric value to the character value.
Is there any FM available?
Points rewared soon.
Regards
RonnREPORT ZSPELL.
TABLES SPELL.
DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
DATA : PAMOUNT LIKE SPELL-NUMBER VALUE '1234510'.
SY-TITLE = 'SPELLING NUMBER'.
PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.
WRITE: 'NUMBERS', T_SPELL-WORD, 'DECIMALS ', T_SPELL-DECWORD.
FORM SPELL_AMOUNT USING PWRBTR PWAERS.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = PAMOUNT
CURRENCY = PWAERS
FILLER = SPACE
LANGUAGE = 'E'
IMPORTING
IN_WORDS = T_SPELL
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
ENDFORM. " SPELL_AMOUNT -
How to convert from value to word ?
Hi all,
I intend to convert from value into words such as 234.50 will be two hundred and thirty four and cents fifty. How should I code or any function will able to produce this ?
Please advise.
Rgds
LimLim
The SP format modifier spells out part of a date - so does YEAR:
SQL> select to_char(sysdate,'YEAR') from dual
2 /
TO_CHAR(SYSDATE,'YEAR')
TWO THOUSAND EIGHT
SQL> To spell out a money amount, you have to take a decimal number and break it into dollars and cents (both integers):
SQL> r
1 declare
2 amount number(10,2) := 12345.67;
3 dollars integer;
4 cents integer;
5 begin
6 dollars := floor(amount);
7 cents := (amount - dollars) * 100;
8 dbms_output.put_line(to_char(to_date(dollars,'J'), 'JSP') || ' dollars a
nd ' ||
9 to_char(to_date(cents,'J'),'JSP') || ' cents');
10* end;
TWELVE THOUSAND THREE HUNDRED FORTY-FIVE dollars and SIXTY-SEVEN cents
PL/SQL procedure successfully completed.
SQL>Note that the spelling out is rather american (in UK we wouldn't add the hyphen and we would say twelve thousand three hundred AND forty five).
Using JSP means we are spelling out a Julian date (ie a number of days, which is allowed to get pretty large. But watch out - there is a limit (somwhere between 1 and 10 million) - ie the number of days between minimum date (4172 BC) and max date (around 31/12/9999).
HTH
Regards Nigel -
Function module to convert character value of month into numeric value?
Hi Experts,
I need to convert a character value of a month in three alphabets to its numeric value.
e.g. 'jun' should be converted into '06' and 'jan' into '01' using a function module.Can anybody please provide me a similar function module?
TIA
Abhishektry this code:
DATA: text(20) TYPE c,
date TYPE sy-datum.
text = '06. Jul 06'.
TRANSLATE text TO UPPER CASE.
TRANSLATE text USING '. '.
CONDENSE text NO-GAPS.
CALL FUNCTION 'CONVERSION_EXIT_SDATE_INPUT'
EXPORTING
input = text
IMPORTING
output = date.
WRITE date USING EDIT MASK '__.__.____'.
Regards,
Dara. -
How to convert character sets???
I need to load a CLOB from a BFile, the BFile is in an (HP-UX) US7ASCII character set and the database is UTF8. I need to load the CLOB using dbms_lob.loadfromfile but can't find any info on how to convert the US7ASCII file into a UTF8 CLOB.
HELP!!!
--Joan ArmstrongJoan,
I don't know if this will help with conversion of you BFILE, but at
http://www.xml.com/lpt/a/2000/04/26/encodings/xmlparser.html
and at
http://xmlsoft.org/encoding.html
there is some information on conversion to UTF8.
Hope it helps. Let us know.
Dave -
How to convert character streams to byte streams?
Hi,
I know InputStreamReader can convert byte streams to character streams? But how to convert the character streams back to byte streams? Is there a Java class for that?
Thanks in advance.When do you have to do this? There's probably another way. If you just start out using only InputStreams you shouldn't have that problem.
-
Very Urgent - Converting Character value to Hexa Decimal value
Hi
data: lv_stsor_hex(16) type X.
p_is_ppc_comp_conf-stsor is a char 10 field ***
<b>write p_is_ppc_comp_conf-stsor to lv_stsor_hex.</b> "<-- Hex Conversion
In 4.6C version this write statement is working fine but this is obsolete in ECC 6.0
and its showing syntax error.
Can anyone tell me how to convert a 10 char length value to a hexa decimal value
which is of 16 characters length and of type hexadecimal
Thanks a lot. Points will be rewarded immediately.Hi,
Use the Function module CHAR_HEX_CONVERSION.
report zeta_hex.
data: s type string.
data: h(1) type x.
data: c(1) type c.
data: byte(2) type c.
data: length type i.
FIELD-SYMBOLS: <DUMMY>.
s = 'ThisIsAString'.
length = strlen( s ).
do length times.
byte = ( sy-index - 1 ).
c = s+byte(1).
* You can do this
ASSIGN h TO <DUMMY> TYPE 'X'.
WRITE c TO <DUMMY>.
* or you can do this
* call function 'CHAR_HEX_CONVERSION'
* exporting
* input = c
* importing
* hexstring = h.
write:/ h.
enddo.
Regards
Sudheer -
IPhone SDK: How to convert Pixel values into Point values
UIScrollView has a property called contentSize. This takes values in points. How do i convert Pixel values into Point Vales?
-TRSAs far as I can tell, they're the same - I know they are in Photoshop at least. My 57x57 point Tab Bar icon is also 57x57 pixels.
Hope that helps -
How to convert ascii value into character and vice versa
Hello the java world people,
I want to convert each characters from my array into their corespondent ascii value and vice versa, how can I do that ?The term "ASCII" is often used very loosely.
Java char values are UNICODE and the ASCII codes are indentical to UNICODE characters in the range 0 .. 127. UNICODE values 128 and above don't have coresponding ASCII values, though 128-255 corespond to ISO-8859-1 which is one of the encodings often called "extended ASCII".
As shown above you can covert between chars and coresponding int value simply with a cast, but you should be aware that the more exotic characters will not give you sensible values. -
How to convert character to ascii
Hi i need to check the value of the character less than space so need to make calc based on ASCII values
can some one tell me how can i convert chars & numbers to ASCIIHi,
Please check this code:
Below logic is for convert from character to ascii value :
report test.
*going from A to 65
data : c value 'A'.
field-symbols : <n> type x.
data : rn type i.
assign c to <n> casting.
move <n> to rn.
write rn.
Below logic is for convert from ascii tocharacter value :
*going from 66 to B
data : i type i value 66.
data : x type x.
field-symbols : <fc> type c.
move i to x.
assign x to <fc> casting type c.
move <fc> to c.
write c.
May it gives you some idea.
I hope it helps you.
Thanks.
Deepak Sharma. -
How to convert the value in GET RUN TIME statement in minutes value...
Hello Experts,
As I understand, the value that is being passed from GET RUN TIME FIELD statement
is in microseconds. Now, how do I convert it in minutes value?
Thank you guys and take care!This will give in Hours , minutes, seconds.
data time type sy-uzeit.
get time field time.
write time.
Check it. -
How to convert character string into ascii format correctly
dear all
I'm using encryption technique in my application(oracle formas 6i). character stream convert to the ascii format and add some numeric value and again convert to the character format
>>>>
here I'm using ASCII and CHR functions.
>>>>
.net program also using same algorithm to encrypt this password.....finally both the character strings are not equel.(This happens if the character string's ascii value greater than 127. otherwise both are equel).
pls give me a solution for this
thanks and regards
buddhikehir dear
do u want to encrypt & dcrypt your password.which version of oracle you are using
first store these procedure in Oracle Databases: dbms_obfuscation_toolkit, dbms_crypto, Transparent Data Encryption
now u can use these procedure to encrypt & dcrypt your password
if you any query about those procedures you can ask me
best regard
amk -
How to convert text values acceses from jsp page into an xml file?
/* this is the jsp page which i want to convert it into an xml file
please help me , i thank in advance*/
<html>
<head>
<title> xml test</title>
</head>
<body>
<form action="testxml2.jsp" method = post>
<ul>
<li>
<ul>NAME:
<br>
<li>First Name:<INPUT NAME="firstName" TYPE=text SIZE=20><br>
<li>Middle Name:<INPUT NAME="middlename" TYPE=text SIZE=20><br>
<li>Last Name:<INPUT NAME="lastname" TYPE=text SIZE=20><br>
<li>t Name:<INPUT NAME="tname" TYPE=text SIZE=20><br>
</ul>
<br>
<ul>Role:</b><p><input type="radio" name="role" value="buyer">Buyer<p>
<input type="radio" name="role" value="seller">Seller<p>
<input type="radio" name="role" value="thirdparty">Third Party<p>
</ul>
<ul>
Qualification:<br>
<li>Highest Degree:<INPUT NAME="degree" TYPE=text SIZE=20><br>
<li>Percentage: <INPUT NAME="percentage" TYPE=text SIZE=20><br>
</ul>
<ul> Adress:
<li> streetName:<INPUT NAME="street" TYPE=text SIZE=20><br>
<li>cityName:<INPUT NAME="city" TYPE=text SIZE=20><br>
<li>StateName:<INPUT NAME="state" TYPE=text SIZE=20><br>
</ul>
</ul>
<b>
<INPUT TYPE=SUBMIT VALUE="ENTER" >
</body>
</html>hi there,
In the MCV there is a part about struts, this is a descent way to do this.
how to do it:
create an actionform containing all the properties of the page.
then when you submit your form use an method in the actionforms (that you have written) that makes sets your data in a xml file.
this works very quickely and i use it in production...
you can choose if you want the xml to generaded hard coded or via a parser.
greetings
Maybe you are looking for
-
Satellite L350-12C - hard drive failure, need recovery
Please help. I have Toshiba Satellite L350-12c and its a German model. My hard drive failed. The local Toshiba repair centre said they can replace the hard drive but without the disc they cant restore it to working order. The worst part is its still
-
Shared photos/videos not appearing in streams on originating imac, only icloud icon
I share pictures and photos to icloud from Aperture 3.5.1. The photos and videos are available on other devices that share the same icloud stream, but in Aperture on the originating imac, when I look in the "icloud" section at the photo streams, I se
-
Installed LabVIEW 8.2, LabWindows 8.01 and TestStand 3.5 on 32 bit Windows XP system on which I have local administrator privileges. When I start TestStand I get the following errors: 1. 'unable to open C:\WINDOWS\system32\cvirte\bin\cvirte.rsc'.
-
How to convert from scientific notations to double value ?
Hi all, i need to convert a string 2E-23 to corresponding double values so that i can compare it one more existing double value. Is there any API present for this ? Thanks and regards, rosamama.
-
It gives me an error message with the text: The Numbers app can't be opened -1712. What am I supposed to do to get it to work again??