This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!

Kiran Er

Greenhorn
+ Follow
since Oct 15, 2016
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kiran Er

Hi Guys,

I am new to Java. I am trying to send an email through Java code. I have below code snippet. When I am sending email, java code is sending out the full name of the file with directory. How do i remove/trim the directory name here.

For example: I have file in the path C:\\OIMDocs\\data.csv, Java is sending out as COIMDocsdata.csv. How do i remove COIMDocs from the file while sending.



Please help me out
9 months ago
Hi Guys,

I am new to Java. I have an arraylist as below and trying to write the same array to a csv file. While writing the characters [ and ] also written in the csv file. How to remove those characters Or is there anyother way to write into csv.

[AJAY.UPPALURI,InActive,Active,InActive,2018-01-03 00:00:00.0]
[AJAYVEER.SINGH,InActive,Active,InActive,2018-01-03 00:00:00.0]

Below is the code

9 months ago
I want to convert 2008-11-24 19:25:24.0 into 24-NOV-2008 using Java and insert into database
10 months ago
Hi Guys,

I have this date format in my code : 2008-11-24 19:25:24.0.  This value is a String format which i am getting from other source. I want to convert/parse this to Date format and using preparedstatment i want to insert into database. Please help me out on this

Regards,
Kiran
10 months ago
Can you point me any sample code or if you have any code please share it

Hi,

I am new to webservices.

I have a html,css page where i will fill all the details like firstname,lastname,email etc.. This html page needs call a webservice. I may require only the response as the "Request submitted". This webservice/html will be deployed in weblogic.

Is this possible ? please let me know how to achieve this.

Regards,
Kumar
1 year ago
I am able to fix with below regex

([a-zA-Z0-9\\-\\s\\'\\.]+)

Regards,
K
1 year ago
Hi,

I am having problem with checking the special characters in java

I need to allow only a-z,A-Z, 0-9, space apostropie - dot   in my string

I tried with different string formats which i found in google but this expression [a-zA-Z.\\'\\- ] always throws false.

Could any one please provide me the regex for the same.




Regards,
K
1 year ago
Hi,

I have this method:

I want to return a different value if there is an exception occur in the below method. Could you tell me what is the long value i have to return if there is an exception. Note that based on the dateDiff i am doing some other operation



1 year ago
Hi,

I have a date which is coming from a csv file and date format in csv file is "10-09-2016 12:00:00" (MM-DD-YYYY hh:mm:ss) format.

I got this date into my program as HashMap<String,Object> format as hm.key(). Once i got the value as String updt = (String)hm.get(key); we are getting as Sun Oct 09 12:00:00 PDT 2016.

I want this updt to insert into oracle database. oracle database column is having  this format (10-09-2016 12:00:00).

I am facing parsing exception in the program before inserting into database.


HashMap<String,Object> hm = jrmunixmap.get(i);
System.out.println("Inside update date::"+hm.get(key));
String updt = (String)hm.get(key);
System.out.println("updt : "+updt);

SimpleDateFormat formatter = new SimpleDateFormat("MM-dd-yyyy hh:mm:ss");
Date date1 = null;
date1 = (Date)formatter.parse(dateObject.toString());
System.out.println("Update date: "+date1);

sqlDate = new java.sql.Timestamp (date1.getTime());
stmt.setTimestamp (17, sqlDate);


I am getting parsing exception at date1 = (Date)formatter.parse(dateObject.toString()); this line.

Error:

----
updt : Sun Oct 09 12:00:00 PDT 2016
Parse exception : java.text.ParseException: Unparseable date: "Sun Oct 09 12:00:00 PDT 2016"
java.text.ParseException: Unparseable date: "Sun Oct 09 12:00:00 PDT 2016"
------

Please help me
2 years ago
Hi,

I need to compare two dates. One of the date come from the flat file and another date from a database. Both the dates are in the same format ("MM-dd-yyyy' 'HH:mm:ss").

Please help me to get the right code for the comparision.

Regards,
Kiran
2 years ago
Thanks for your suggestion. I was able to achieve with Stringbuilder.

2 years ago
Here is my code:



I am getting output like this : [I4227611, M2289, L399488]. But i don't want the beginning character '[' and end character ']' . How do i achieve this. Because i need concat this with other string in my other program.
2 years ago