Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5976907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:17:41+00:00 2026-05-22T21:17:41+00:00

I am using the below method to get this string to_date(‘2011/06/02′,’yyyy/mm/dd’) private static String

  • 0

I am using the below method to get this string to_date('2011/06/02','yyyy/mm/dd')

private static String getOperationDate() {
  Date today= new Date();
  String output;
  SimpleDateFormat formatter;
  String pattern="yyyy/MM/dd";

  formatter = new SimpleDateFormat(pattern, Locale.US);
  output = formatter.format(today);
  String temp="to_date('"+output+"','yyyy/mm/dd')";

  return temp;
}

How can i generate something like this to_date('2011-05-27 12:45:56.1',....) i.e., apart from just date how can i also include time with milliseconds, which would then be updated to the database

Added a oracle insert statement, after referring to an answer by trutheality, but this gives me 01810. 00000 - "format code appears twice" error

INSERT INTO CONFIG_INFO(CFG_ID,CFG_NAME,CFG_DESC,CFG_TYPE,FILE_NAME,ABSOLUTE_PATH,EMAIL_ADDRESS,PROJECT_ID,HOSTNAME,CREATE_DATE,UPDATE_DATE,STATE,PRODUCT_ID)
    VALUES (config_seq.NEXTVAL,'Abhishek','as','Production','asdclient1.xml','E:tomcat 5.5bin/../webapps/asd/files/asdclient.xml','a@a.com','ABC','abhinix',to_date('2011/06/02 11:18:38.211','yyyy/MM/dd HH:mm:ss.SSS'),to_date('2011/06/02 11:18:38.211','yyyy/MM/dd HH:mm:ss.SSS'),2,123456)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T21:17:42+00:00Added an answer on May 22, 2026 at 9:17 pm

    Look at the docs, and figure out what your format string should be.

    Probably something like

    String pattern = "yyyy-MM-dd HH:mm:ss.SSS";
    

    But the proper way is to use the JDBC driver as OMG Ponies has pointed out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the below method to reply to mails coming in to a business
Currently i am creating an extension method that accepts parameters. Using the below example,
I have a class that I am using below. And I am using this
Below is the code I'm using to return a paged list of objects: string
I really want to get this out of my head. Please see below code:
Using .NET 3.0, I've got the method below which correctly returns a collection of
I am using below code to get the current time in specific format and
i am using below code to change the the font type of text view.
Currently i'm using below code which works well. $(#topperAtBaseLevel:visible, #lowerAtBaseLevel:visible, #midAtBaseLevel).hide(); any optimised code?
I am using below code to create a reminder in Google calendar (using Google

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.