Add time to a Date field

Hi,
I have a problem where in my Database I have a date & time field. when i query this field in mysql, it looks like this
2009-05-22 11:17:52.000
year 2009
month may
date 22nd
time 11:17  (52.000 seconds)
I want to be able to add an hour to this field in Crystal Reports and output it on a report. So the output would look something like:
2009-05-22 12:17:52.000
How would I go about doing this.
I tried doing a ToText() + '2009-05-22 12:17:52.000' but it just appends it to the end of the rigonal date.
thanks
J
Sorry..I forgot to mention the DateField is a Date/Time field.
Edited by: James Knockler on May 22, 2009 12:21 PM

Hi!
Try writing a formula using the following line. It works with MS SQL, sorry, I don't know if it will help in MYSQL.
local datetimevar temp := dateadd("h",1,)
Regards,
David

Similar Messages

  • I would like to add a new card date field to my address Book Contacts. Is this possible? Thanks, Jeff

    Hi,
    I would like to add a new card date field to my Address Book Contacts. Is there any way to do this? I have a lot of contacts and it helps me remember who I talked to, if I had a new card date field in my contacts.
    Thank you,
    Jeff

    Hi,
    I found the applescript below from Michael Bach that works well.
    (* Find recently modified entries in the Address Book
    Input: a time interval (backwards from today) in the variable "daysBeforeToday"
    Output: a string on the clipboard, format: YYYY-MM-DD (tab) Name (return)
    ©2009, Michael Bach, <www.michaelbach.de> *)
    set daysBeforeToday to 7 -- <<<  change as desired or read from a dialog
    tell application "Address Book"
      copy (current date) - daysBeforeToday * 24 * minutes * 60 to referenceDate
      copy (every person whose (modification date > referenceDate)) to modifiedPersons
      set s to ""
      repeat with aPerson in modifiedPersons
        set d to ((modification date) of aPerson) -- now change to international format and forget the hours
        set dateString to (year of d as string) & "-" & (my twoDigits((month of d) as number)) & "-" & (my twoDigits(day of d) as string)
        set s to s & dateString & tab & (name of aPerson) & return
      end repeat
      set the clipboard to s --for pasting into other applications
      s -- to view immediately in the script editor
    end tell
    on twoDigits(aNumber) -- trivial utility for formatting
      if aNumber < 10 then return "0" & (aNumber as string)
      return (aNumber as string)
    end twoDigits
    I changed the modification date to creation date.
    Thanks for the replies.

  • Inserting Date and Time into a date field

    Okay I am a bit of a Oracle newbie. I am trying to insert the following date and time into a date field and I don't know how to format the second part of the to_Date() function.
    Date/Time: 5/29/2003 7:58:45 PM
    Thanks,
    Branden

    I believe you would want
    to_date( '5/29/2003 7:58:45 PM', 'MM/DD/YYYY HH:MI:SS AM' )
    Note that tahiti.oracle.com has all of Oracle's documentation, including the very useful SQL & PL/SQL reference manuals, available for free.
    Justin

  • Add days to a date field on adobe form

    Hi,
    I have to add 15 days to a date field how i do that on javascript or formcalc?
    Thank you in advance.
    Miguel

    Hi,
    The below is in js code.
    I had a caluclated date time field on the screen which displayed the current date.
    The below code will just add 15 days to the day part of the date.
    for moving it to month if its more than 31 is to be handled by you.
      var valArray = this.rawValue.split("/");
      var newDate = valArray[1] + 15;
      var actualVal = Date.parse(newDate+"/"+valArray[0]+"/"+valArray[2]);  
    var dateType=new Date(actualVal);
    this.rawValue = dateType;
    Hope this helps you out, let me know if you need any more info.
    Cheers,
    Sai

  • Add Days to a Date field

    Hi all,
    I have the following requirement:
    I have a date field 0calday and the user would like to add a specific no.of days to it, like for example 10 or 15 days. Then we use this computed date field in calculations in the query. Could you please help and let me know how we can no.of days to a date field? And also how we can compute no.of days between two date fields?
    Regards,
    Ashmith Roy

    Hi Ashmith,
        When the user enters both date and no. of days, and if you want to calculate no of days from the user entered date I think you can go for an exit where you can use the available function module which calculates the no of days from starting of the month for the given date. Then you can add up the days entered by the user and use another available function module which converts it to the dat format again based on the given days and the old date. I don't remember the function module names but i am sur ethey are available.
    If the above thing is made possible then I think getting no of days between two dates is not a problem. Well i hope this will help you.

  • Deriving Time Characteristics from Date fields in ODS View

    Hi,
    I am creating ODS Views using HANA calculation views.
    is there any direct approach to derive time characteristics like cal week, cal quarter, cal month, calmonth 2, fiscal year, cal year etc from date fields?
    work around:
    Deriving them in HANA view in calculated columns and mapping them to IO created with respective time characteristics as reference.
    is there any standard and easy to use approach for this??
    Thanks in advance.

    Hi Ravi,
    Insteod deriving them in the ODS view you can derive them in tha Calculation View in SAP HANA itself using Time Dimention concept.
    Regards
    Jagan

  • Cannot store time in DB Date fields

    Time is truncated on all my dates field in database. When I expand the tables in Form Developer, Date Items are defined as Date(7).
    Is this the cause of my problem?
    Thanks for any info,
    Valdek

    IT DOES NOT GET TRUNCATED. HERE HOW I SIMULATED YOUR PROBLEM. CREATED A TABLE CALLED X WITH A FIELD Y AS DATE TYPE. CREATED A BLOCK BASED ON THE TABLE X. SET THE FORMAT MASK AS MM/DD/RRRR HH24:MI:SS . SET THE DEFAULT VALUE TO $$DBDATETIME$$. RUN THE FORM. CHANGED THE TIME. SAVED THE DATA. RETRIVED THE DATA . IT RETRIVES PERFECTLY WITH THE VALUE LIKE 08/22/2001 17:22:51. TO GET IT IN SQL YOU HAVE TO USE TO_CHAR LIKE
    SELECT TO_CHAR(Y,'MM/DD/RRRR HH24:MI:SS') FROM X;
    HOPE YOU GOT THE ANSWER.

  • Add  5 second in date field

    I have table emp(a number, b date )
    I want to add in date field to 5 second only
    plz suggest me

    double post
    Re: Query to add in date field to second

  • How to calculate Average time from a date field

    Hi All,
    I have a date type field in my table .
    I want to calculate average time for a given country in a select query. Date has to be exculded. Only time has to be taken into consideration.
    Kindly help me.
    Sample data
    india 25-JUN-09 08:12:45
    india 25-JUN-09 09:01:12

    Take which one you want.WITH dates AS
      (SELECT sysdate x FROM dual
        UNION
       SELECT sysdate + 1 +1/24 FROM dual
    SELECT TO_CHAR(to_date(AVG(to_number(TO_CHAR(to_date(TO_CHAR(x,'HH24:MI:SS'),'HH24:MI:SS'),'sssss'))),'sssss'),'hh24:mi:ss')
       FROM dates;
    WITH dates AS
      (SELECT sysdate x FROM dual
        UNION
       SELECT sysdate + 1 +1/24 FROM dual
    SELECT floor(24 * AVG(x- TRUNC(x)))
      || ':'
      || floor(mod(24 * AVG(x- TRUNC(x)),1) * 60)
      || ':'
      || floor(mod(mod(24 * AVG(x- TRUNC(x)),1) * 60,1) * 60)
       FROM dates;By
    Vamsi

  • How to insert a data&time to Database date field

    Dear Friends,
    I have created a Stored Procedure which takes a Date data type as an input,When i call this procedure from java i need to set the data&time in
    yyyymmddhhmmss format. How to set this from java ?.
    Rgds
    Mohan S

    How to set this from java ?.Usually you use a prepared statement and one of the set methods.
    Or you can use setString() and format the date yourself using SimpleDateFormat.

  • Time/Date Field Not Returned in PDF

    I have created a very simple form in LiveCycle Designer 8.0. The form enables the user to input data into columns labeled "name," "change type," and "change date." I used the date/time object for the "change date" row fields.
    When my testers (using Acrobat 7.0) email the saved form back to me, all of the fields are populated with the information they entered, except the "change date" column fields. I asked if they used the flyout calendar or typed in the date manually, and all used the calendar.
    Is this a compatibility issue, or is there something I need to do to bind the chose value to the field when the form is saved?

    The issue with the time portion of date field not displaying in Data tab of a Table window has been posted before - see date format while browsing data
    I still get the problem in v1215 connecting to either 9i or 10g databases. Note that this problem does not happen in the SQL Worksheet results area, so simply querying the table data with a select doesn't test this.
    As for Ctrl-C, Ctrl-V changing the date format to MM/DD/YYYY HH24:MI:SS when copying data out of the SQL Worksheet Results - I also still get this in v1215.

  • Add time to date

    Hello!!!
       I need a function module in CRM to add time to a date . DO you know any???
       Thanks.

    Hi Jorge,
    Do you mean you need to create timestamp out of date and time.
    Have a look at the IB_CONVERT_INTO_TIMESTAMP function module.
    You can also use the following statement:
    *Convert date to time stamp
      CONVERT DATE sy-datum
              TIME sy-uzeit
              INTO TIME STAMP gv_timestamp
              TIME ZONE sy-zonlo.
    <b>Reward points if it helps.</b>
    Regards,
    Amit Mishra

  • How to Add Time in Date

    hi,
    how to add time in a date for example
    date='01-jan-2005 23:00' [dd-mon-yyyy hh24:mi]
    time (to add)='02:00' [hh24:mi]
    if any one hv any idea about. pls reply

    If you can get the time element into an INTERVAL DAY TO SECOND datatype, you can simply add the interval to the date, e.g:
    yourdate + NUMTODSINTERVAL(2,'HOUR')
    What is tricky is converting a string like '02:00' into an interval or a number. You could generate a numeric offset with something like:
    TO_DATE('02:00','HH24:MI') - TO_DATE('00:00','HH24:MI')
    which can then be added to the date
    SELECT TO_DATE('01-jan-2005 23:00', 'dd-mon-yyyy hh24:mi') +
           (TO_DATE('02:00','HH24:MI') - TO_DATE('00:00','HH24:MI'))
    FROM   dual;

  • Powerpivot pivottable - I can't add or drag a "value field" from the pivottable field list into the "values" section.

    I built a pivottable using Powerpivot.
    Initially, I can add or drag any data field I want to columns, Rows or the Values area inside the field list (those 4 squares). However, as times goes by...suddenly... I just no longer can add or drag a "value field" from the pivottable field list into the
    "values" section. 
    Does anybody know how to fix this problem ?

    Hi Bin Long,
    I tried what you suggested.
    I believe that there is a glitch in the Powerpivot field list (where you find the 4 squares for columns, rows, values, filter)
    When I initially create a pivottable with powerpivot, everything works fine when I am adding field list items to the the columns, rows, values sections, filters.
    However.....IF I close the powerpivot field list or if I save and close the excel file...then I cannot add more items to the "values" section.
    I can comment about one thing that seems different in my powerpivot field list. When I can no longer add items to the "values" section, I realized that in the TOP section of the field list I see in bold letters a summary of the items that are SUM ∑ in the "values"
    section.
    Does anybody know how to fix this ?
    Thanks.

  • Pass Date from Internal table to Date field of Deadline(in expression tab)

    Hello,
    I need to set deadline in workflow according to dates in Internal table. So please guide how to achieve this.

    Thanks Rick for taking interest in my issue.
    Business scenario:-
    --> when PO is created delivery date is given in PO.
    --> Now all materials in PO can be delivered on same date or on different dates.
    -->Their can be same delivery date or different delivery dates.
    --> So for example:- For a PO their are 4 materials-
            MATERIAL NAME     DELIVERY DATE
              Material1                   10.11.2011
              Material2                   20.11.2011
              Material3                   20.11.2011
              Material4                   10.11.2011
    Now Material2 and Material3 will be delivered on 20.11.2011  and Material1 and Material4 will be delivered on 10.11.2011.
    Now a reminder mail should go to Vendor of that PO before 2 days of delivery date mean on 08.11.2011 and 18.11.2011.
    So to store 2 dates I require internal table.
    Now I am able to trigger reminder mail for 2 dates by using multiline element in miscellaneous tab of activity.
    But as I discussed in previous post that if I add multiline element in Date field of Requested start deadline then it gives error(plz check prev. post to see exact error). So I tried to used internal table(container in workflow) in deadline which is filled from a task in activity, but it is also not working means mail is triggered as soon as worflow is executed.
    So the main problem is deadline is not created based on dates in internal table and other all the things are working perfectly.
    As I am very new to workflow area, I might be going wrong somewhere.
    So please guide how to set deadline for multiple dates(according to my scenario).
    Thanks in advance.
    Regards,
    Mihir

Maybe you are looking for

  • How do I Get the value from a mouse click - on a waveform graph?

    If I have made a plot into a Waveform Graph and later want to do a zoom of my data (Not zoom into the Waveform Graph, but regenerate the data). How do I read the mouse coordinate if I click on the graph window. I know how to put up the horiz and vert

  • Safari Has encountered an error and needs to close

    Hi I have been having this problem with safari that right after it starts it closes due to an error (thats what it says) I really like safari and i'm waiting on my mac to get here so HELP!

  • Validation problem in Mapping

    Hi, I am getting this error when I am trying to validate the mapping Source table is QMI " VLD-1002: Mapping object QMI is not bound to a repository object. All objects in a mapping must be bound to objects in the Design Repository. Unbound objects i

  • How to send group text

    How do I set up a group for texting on my phone?

  • PDF String literal Parsing Issue

    I have the following contents in the same PDF page, in different ObjectX: link to original file First:     [(some text)] TJ ET Q     [(some other text)] TJ ET Q Very simple and basic so far... **The second**:     [( H T M L   E x a m p l e)] TJ ET Q