Another DATE/TIME question

HI all
I am trying to INSERT INTO TABLE a date and time into one line..
excerpt looks like
CREATE TABLE Test
(Submit DATE );
INSERT INTO Test
VALUES(to_date('2001-01-02 22:23:00','yyyy-mm-ss hh24:mi:ss'));
I get an error message that says it's missing a comma (and I can't figure out WHERE). I have tried quotes in different places etc...Is it not possible to put a date and a time in the same slot?
Thanks in advance

Try this...
SQL> create table mytest (submitted date);
Table created.
SQL> desc mytest
Name Null? Type
SUBMITTED DATE
SQL> insert into mytest
2 (SUBMITTED)
3 values
4 (to_date('2001-01-02 22:23:00','yyyy-mm-dd hh24:mi:ss'));
1 row created.
SQL> select * from mytest;
SUBMITTED
02-JAN-01
HI all
I am trying to INSERT INTO TABLE a date and time into one line..
excerpt looks like
CREATE TABLE Test
(Submit DATE );
INSERT INTO Test
VALUES(to_date('2001-01-02 22:23:00','yyyy-mm-ss hh24:mi:ss'));
I get an error message that says it's missing a comma (and I can't figure out WHERE). I have tried quotes in different places etc...Is it not possible to put a date and a time in the same slot?
Thanks in advance

Similar Messages

  • Another Date/Time Bug?

    I found now, that all my images from 10D and G2 have a wrong Date/Time Original in lightroom. It's shown one hour too early. All my other viewers show the correct time in exif data.
    The images from my 30D otherwise are correct in lightroom.
    What happens here?
    Juergen

    Ok, I looked a little bit deeper.
    All my pictures from end of october until end of march have correct time in lightroom. Daylight saving time begins last weekend of march and ends last weekend of october in germany.
    But I always change the time in my cameras on the first day after daylight saving time changes. It seems it hasn't anything to do with the camera model because I own the 30D only since last november.
    Why doesn't lightroom only show the exif times from the files and is calculating something wrong by itself?
    Juergen

  • Insert Date & Time question

    Does anyone know if there is a way to DESELECT the "Automatically update the date and time when the document is opened" dialog?
    Thanks.
    Paul

    The only way I can see is to create your own template with this unchecked. Then, when you open this template, auto date & time should be unchecked.
    It would be nice if this were a global preference. I suggest you leave feedback for the Pages team.

  • Date/Time Questions

    Hi, I'm a new Java programmer.
    I need to format a date/time variable from sql server into two string objects. One string object storing the date and the other storing the time.
    I've tried using the Date class and DateFormat class, but I haven't found a way yet.
    Can anyone help me?
    Thanks a lot,
    louis

    You could try something like this:
    Date dateAndTime = /* read date from sql server */;
    DateFormat dateOnly = new SimpleDateFormat("yyyy-MM-dd");
    DateFormat timeOnly = new SimpleDateFormat("HH:mm:ss");
    String dateString = dateOnly.format(dateAndTime);
    String timeString = timeOnly.format(dateAndTime);

  • Date + Time question updating to a DATE field..

    Hi,
    I'm going crazy...
    MEETING_DATE is a DATE column in the DB
    :P40_MEETING_DATE is a TEXT FIELD with source MEETING_DATE
    :P40_MEETING_DATE:=to_char(to_date('02-OCT-2006 09:14:45 PM','DD-MON-YYYY HH:MI:SS PM'),'DD-MON-YYYY HH24:MI:SS');
    Ultimately I need to have :P40_MEETING_DATE a date picker and then
    add a character string of a time to it.
    :P40_MEETING_DATE:=to_date(to_char(:P40_MEETING_DATE,'date picker format?')||' '||:P40_START_TIME,'date picker format?');
    I get all kinds of errors ORA-01858 errors.. non- numeric errors.. invalid month errors..
    Bill

    You are right, sorry about that.
    I thought about sneaking a On Submit - After Computations and Validations process in there before the Process Row process like this:
    :P216_X := TO_DATE( TRUNC( TO_DATE( :P216_X, 'DD-MON-YY HH24:MI' ) ) || ' ' || :P216_TIME, 'DD-MON-YY HH24:MI' );but that's probably the same thing you tried before.
    I would just turn it into a procedure and pass the parameters...;)
    I hope someone can get your going in the right direction.
    chet

  • Simple Date/Time Question

    ok so I can print out the date and time when i run the program.
    How would I write a method that updated the clock every second, kinda like a digital watch. would I just use a while loop? or does java have an actual running clock?
    Here is the code I have so far:
    import java.util.Date;
    public class DateTime
         Date now = new Date();
         public DateTime()
              System.out.println(now);
          public static void main(String[] args)
               DateTime run = new DateTime();
    }

    import java.util.Date;
    public class DateTime
         Date now = new Date();
         public DateTime()
         {while(true){
              System.out.println(now);now = new Date();
    Thread.sleep(1000);
         public static void main(String[] args)
              DateTime run = new DateTime();
    I modified your code a bit better do this in a different thread though if you plan to use a GUI

  • Newbie: Date time question

    I want to store a date and time into the same column. But I do not know the syntax to do it and to select it.
    Can anyone help me?

    Oracle should store this anyway - all you need to do to see this is to set the nls_date_format for the session you are using to 'DD-MON-YYYY HH24:MI:SS'
    GR

  • Date/Time Question - Milliseconds

    How can I get the number of milliseconds after the 1970... from a date?
    Is there such a method in the API? I looked at the DateFormat and NumberFormat classes but I didn't find it... Is there a way a to do this?
    I want to be able to give a date and get back the number of milliseconds past the 1970 thing...
    Thanx

    DrClap has a good solution. Here is another twist:
    // Do this
    SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
    Date start = formatter.parse("01/01/1970");
    // Or do this
    Calendar calendar = Calendar.getInstance();
    Calendar.set(1970, Calendar.JANUARY, 1);
    Date start = calendar.getTime();
    return (new Date().getTime() - start.getTime());- Saish

  • Another Date Calculation Question.

    Hi All,
    OK, this is a continuation from here: http://forums.adobe.com/thread/906583  Basically, I need to change the form a little and therefore need a continuation of that threads result.
    Short version - I need to take a future date which is calculated by taking a result of a drop down (0-13) and using this script finding a day in the futue:
    var f = this.getField("BILLINGCYCLEDATE");
    var g1 = this.getField("DAYS");
    var g = g1.value
    var today = new Date();
    var add = today.valueOf();
    add +=1000 * 60 * 60 * 24 * g;
    var future = new Date(add);
    f.value = util.printd("mm/dd/yyy", future);
    Basically it adds a number of days to today and giving a result.
    What I need to do is take that result, add another number of days (0-13 again) to give a new date.... and I am struggling to get a result at the moment.
    So here is a real workd scenario:
    How many days from today will the contract start?  (option 0-13 days) = RESULT A.
    How many days from RESULT-A will first payment be due (option 0-13) = RESULT B.
    Does that make sense?
    Thanks for any help you might be able to provide.
    Ant

    Hi Mate,
    OK, this gave me a result... but it was a result of X number of days from today (rather than from the result of "RESULT-A"
    Here is what I placed in as my script.
    var f = this.getField("DirectDebit_Start");
    var g1 = this.getField("Daysuntilstart");
    var g = g1.value
    var n1=this.getField("MembershipDaysTillBilling");
    var n=n1.value
    var today = new Date();
    var add = today.valueOf();
    add+=1000*60*60*24*g*n
    var future = new Date(add);
    f.value = util.printd("dd mmmm yyyy", future);
    Any thoughts on where I am going wrong?  I have tried doing a few different things but I either get no result or I get X days from today's date.
    Thanks for your help!

  • Another Data Merge question...

    Thanks, SRiegel, now that I’ve added the apostrophe in the title of the photo column, the Data Merge box DOES indicate photo. The problem is, when I do the Data Merge, it says the photos can’t be found. Here’s an example of how I have the photos listed:
    U:\MyPictures\employees3\smithjohn.psd
    Thank You

    Is that path correct? Can you place that image outside of data merge into another document, and doe it say that's the path?

  • How to cell register the date/time when you put a value in another cell

    Hello guys!
    How do I get a cell (eg A2) tell the date and time when I put a value in another cell (eg A1) in Numbers?
    For example, I want to register a cell to read my electricity meter.
    I write in cell A1: 45809. When placing this value in A1, I want to appear (on A2) the date and time when I did that record automatically. Is it possible?
    I hope you understood the question!
    Thank you in advance to those who try to help.

    There is not automatic time stamping of on entry of a time.  One suggestion I've seen has a cell that has the current date and time.  Everytime you cahnge any cell that cell will update.  You can then copy that cell and paste the value into your date/time cell adjacent to the meter reading:
    Create a new, plain table:
    Now in cell A1 enter the formula "=now()"  short hand for this is:
    A1=now()
    now resize the table so it is a table that is 1 cell by 1 cell by selecting any cell, then dragging the table size control in the bottom right corrner towards cell A1:
    It should look like this when you have completed this task:
    Now create another new, plain table and enter "Date" for cell A1, and "Meter Reading" for B1:
    Now you can enter a meter reading (I entered "45671").  Now select the CELL that has current date and time from the first table at the very top, and copy:
    Now select the cell in the date column where you want to put the current date and paste values by using the menu item "Edit > Paste Value":

  • With 10.7.2 update iCal does not allow you to set "Reminders" by draging events from "All Day Events" into "Reminders" is there another way to do this instead of having to type out the entire reminder with date, time, and type?

    With 10.7.2 update iCal does not allow you to set "Reminders" by draging events from "All Day Events" into "Reminders" is there another way to do this instead of having to type out the entire reminder with date, time, and type?
    With Lion 10.7.1. you where able to drag events from "All Day Events" into the "Reminders" bar to create upcoming reminders.

    Exactly the same question I was about to post!
    Great being able to sync reminders (well overdue) however if I have to re-type a calener envent into reminders it's a waste of time!! 
    Come on Apple!!
    Just need an option for the calender event to add to reminder or the old drag to add to reminder functionality back, Please???

  • Adding Date/Time Field + X Number of Days - Basic Calculation Question

    I am assuming this is a basic calculation question. New to Adobe LiveCycle Forms.
    I have a simple form containing a table. The table appears as such:
    Text
    Formatted as Date/Time Fields
    Header 3
    Monday
    user wil choose the beginning date (Date/Time) this is DateTimeField1
    Tuesday
    this should calculate DateTimeField1 + 1
    Wednesday
    this should calculate DateTimeField1 + 2
    Thursday
    this should calculate DateTimeField1 + 3
    Friday
    this should calculate DateTimeField1 + 4
    Saturday
    this should calculate DateTimeField1 + 5
    Sunday
    this should calculate DateTimeField1 + 6
    Calculations are performed after the date is chosen for Monday. My mind tells me the simple calculation of DateTimeField1 + 1 is not going to work (and in fact doesn't!) as it needs to change Monday to a number first. I saw on another thread the following:
    Num2Date(Date2Num(Date(DateTimeField1), "DD.MM.YYYY")+7, "DD.MM.YYYY")
    Thought this was going to get me close. No cigars though!
    Any quick help is greatly appreciated. And since I am new to this, details about what needs to be changed would be great too!
    Thanks

    Here an addition for you date field.
    This FormCalc script in the exit:Event will check it the selected date is on a monday.
    If not it will go the days back until the last monday.
    var Selection = Date2Num($.formattedValue, DateFmt(2))
    var WeekDay = Num2Date(Selection, "E")
    var NewDate
    if (WeekDay eq 1) then
              NewDate = Selection - 6
    elseif (WeekDay eq 3) then
              NewDate = Selection - 1
    elseif (WeekDay eq 4) then
              NewDate = Selection - 2
    elseif (WeekDay eq 5) then
              NewDate = Selection - 3
    elseif (WeekDay eq 6) then
              NewDate = Selection - 4
    elseif (WeekDay eq 7) then
              NewDate = Selection - 5
    else
              NewDate = Selection
    endif
    $ = Num2Date(NewDate, "EEE DD.MM.YYYY")
    Hope this helps, too.

  • Question on date, time and time stamp related - high priority

    Hi friends,
         My requirement is to find the processing time (time taken) of a task done by an agent in wf. For that I use Start Date, Start Time, End Date and End Time ( from struc SWP_LOGTAB ). I have to display the time taken by an agent in the form WWd XXh YYm (or WWd XXh YYm ZZs) ex: 2d 10h 40m 20s.
    Can any one suggest me the right FMs which take start and end date/time and give me the above format result?
    This can be achieved manually with unnecessary Ifs and CASEs but its gonna be a performance issue. Please suggest me something SAP standard.
    Thanks in advace for your help
    Reddy

    Hi,
    I don't find any function module, but it does'nt really hard to code this using DIV and MOD instructions :
    If you've got your time in seconds :
    w_day = w_time DIV 86400.
    w_mod = w_time MOD 86400.
    w_hour = w_mod DIV 3600.
    w_mod = w_mod MOD 3600.
    It doesn't seem too bad in term of performance....
    Mathieu

  • Adobe LiveCycle Date/Time Field Scripting Question

    I have a date/time field in Livecycle which the end user chooses a random date from.  I need to populate a date 180 days from this date for an eligible to date/time field.  I have tried various javascript and formcalc options with no success.

    Try this site here for a reference: http://eslifeline.wordpress.com/2008/09/26/date-manipulation/
    The following was the use case. A form has 2 TextFields Start_Date and End_date
    User enters a certain date in the Start_Date text field for example 09/24/08 (MM/DD/YY)
    The End_Date should add 90 days to the Start_date and populate the End_Date
    The following script would do that
    var current = Date2Num(Start_Date.rawValue, “MM/DD/YY”)
    var future = current+90
    var newDate = Num2Date(future,”MM/DD/YY”)
    form1.#subform[0].End_Date.rawValue = newDate 
    Validating End Date is later than Start Date
    var diff = Date2Num(EndingDate.rawValue, “YYYY-MM-DD”) – Date2Num(StartingDate.rawValue, “YYYY-MM-DD”)
    if (diff > 0) then
    xfa.host.messageBox(“The End date is later than start date”)
    else
    xfa.host.messageBox(“PLEASE CHECK….The End date is before the start date”)
    endif

Maybe you are looking for