Adding 18 hrs to a Date/Time column

Hi All 
Power Query provides the functionality to add days to a Date/Time  column with the  " Date.AddDays()"  function. However this appears to only accept whole numbers as inputs.
I want to add 18 hrs to a Date/Time column  How can I do this?
Cheers
Steve

I was able to achieve this by converting the date into a number, adding 0.75 and then converting back into a date.
Here is the code, source is just a workbook with the following data
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    AddC= Table.AddColumn(Source, "Time", each Number.From([DateTime])),
    ValueAdd = Table.AddColumn(AddC, "Custom", each [Time] + 0.75),
    HoursAdded = Table.AddColumn(ValueAdd, "Time +18", each DateTime.From([Custom]))
in
   HoursAdded
Final Output
Would be interested if there is a more elegant alternative

Similar Messages

  • Type of object from a database date/time column

    Hello everyone,
    I've got a concern regarding the way in which coldfusion is
    treating date/time columns in a database.
    In my opinion when I select a column that is let's say
    timestamp type - the object in a query is CF's date/time object.
    I've checked the query by getMetaData() and it looks like each
    column has its own database type (eq. varchar2, date, etc).
    My concern comes from a fact that I've heard that Coldfusion
    is treating the date-time columns in a database as strings and in
    each case it parses them. So the difference in a locale between a
    database server and a Coldfusion server may result in a wrong
    date/time object.
    Example:
    Locale of database EU: yyyy/mm/dd
    Locale of Coldfusion US: yyyy/dd/mm
    The date like 1st of February 2007 stored in a database would
    look then in Coldfusion like: 2nd of January 2007
    Could someone please confirm which version is valid?

    Johnny852 wrote:
    > In my opinion when I select a column that is let's say
    timestamp type - the
    > object in a query is CF's date/time object. I've checked
    the query by
    > getMetaData() and it looks like each column has its own
    database type (eq.
    > varchar2, date, etc).
    if you already know cf is returning a datetime from a
    datetime in the db, what's
    the question?
    > My concern comes from a fact that I've heard that
    Coldfusion is treating the
    "fact"? unless the datetime is stored as a string, that's not
    a "fact".
    > Example:
    > Locale of database EU: yyyy/mm/dd
    > Locale of Coldfusion US: yyyy/dd/mm
    btw neither of your example "locales" are in fact locales.
    > The date like 1st of February 2007 stored in a database
    would look then in
    > Coldfusion like: 2nd of January 2007
    if you pass a numeric string representation (2/1/2007 for
    instance) of a date to
    cf, it will be interpreted via the cf server's "default"
    local (ie en_US,
    month/day/year) unless you use one of the LS functions like
    LSParseDateTime() &
    specifically set the the locale (like setLocale("th_TH")) or
    make the date
    non-ambiguous (2-feb-2007) or build the date yourself from
    user input using
    createDate() or createDateTime(). you just need to convert
    the user's string
    representation to a valid cf datetime object (or i guess
    force to database to
    follow the user's locale date mask).

  • Displaying 'Date & Time' Column

    Hi there, I did do some searching/ reading prior to posting this, but haven't found what I'm looking for...
    I want to copy/ paste all my texts from my Nokia 6288 to my pc...
    -this works no hassle, I simply use the Nokia Phone Browser to load all my 'Inbox' and 'Sent Items' and move them to the desired folder on my hard drive...
    Problem is, in the Nokia Phone Browser, I get columns I can't seem to get in either Windows XP Pro or Windows Vista Business (which has more columns on offer)...
    This means, when im looking at the files on my PC, rather than using the nokia phone browser, i dont get the same details which is a bit of a problem for me...
    So what I want to know is:
    How do i get the Date & Time Column (and all the columns the Nokia Phone Browser displays) to show up in Windows XP or Vista or both?
    Thanks in advance

    Hi Austin,
    I have two remarks about that.
    1) It's better to put the population of change/history attributes into a table trigger of type before row where you assign these values. eg.:
    :NEW.CREATE_DATE := SYSDATE;
    :NEW.CREATE_USER := NVL(V('APP_USER'), USER);The reason is, it will consistently work for all applications which try to insert a record into this table and don't have to worry about change attributes and second, when you use the default property of APEX it will populate the column with the value when the new row was displayed and not when it was saved and third, a user would be able to fake this value and write something else into it (eg. with Firebug or by saving the HTML page) and "create" the record with a different time as you would expect. -> Define the column as "display only doesn't save state"
    2) Don't rely on automatic type conversion, remember that for APEX everything is a string that also means that your default value expression has to return a string to be 100% sure that it work on all systems where the default database format mask of Oracle could be different. Change your code to
    TO_DATE(SYSDATE, 'DD-MON-YYYY HH24:MI')Just some thoughts, but a testcase on apex.oracle.com is always good to reproduce and help with such a problem.
    Patrick
    My APEX Blog: http://www.inside-oracle-apex.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://apexplugin.sourceforge.net/ New!

  • Pre-populating a date/time column with the value entered in the last added item

    I have a list with a column called "expected finish date". Whenever the user adds the very first item in a list, he/she should have to enter a value for this column.
    I want to make all new item entries to pre-poplate this field with the value entered in the previously added item. This way, he/she wont have to re-enter the date every time (which rarely changes). How can this be done?

    could create a second list ("state") with column ("default finish date")...
    create a workflow on main list... if column is blank/empty, pull from second list... otherwise, update second list with the value that was entered.
    Or, customize the form (InfoPath or JavaScript)
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • Adding hrs and minutes to time

    Hi guys, I currently have a problem where I have two date fields with time stamps. The only bit i am currently interested in in these fields is the time factor. When i display them in their field they have a format of HH24:MI .
    I have a start time and end time as well as a duration and duration type. What I am trying to do is the following: when the user inputs the start time, along with the duration say 1 for example and the duation type of say HRS for example I would like to have the end_datetime default to 1 HR from the current start time. This is the code I use on a when validate item trigger to acheive this:
    case :blk.duration_type
    when 'HRS' then
    :blk.end_datetime := :blk.start_datetime + ((1/24)* :blk.duration);
    when 'MINS' then
    :blk.end_datetime :=     :blk.start_datetime + ((1/24/60)* :blk.duration);
    However, everytime it triggers the value put into end_datetime is 0:00 is it something to do with the datatypes im using or would anyopne have a solution to this problem? any help would be very much appreciated.

    Hi user13390506
    if you post again below I will mark you with a correct answeru can modify it to be Correct Still has a chance ... :)
    Ahmed Deserve it he helps so many people here and also most of the Top users here Like Andreas,Francois, Sarah and others...
    @ Ahmed if u don't care about points but it is indicator to the OP that this info is works and also this person is distinctive and has many helpful and correct answer.
    i always pray to god to let all and every work in our life to his sack (Allah's Sack) just to have Hasanat and this is the real thing that worth.
    Pls Remember that one's work is one of the things that may beneficiate to oneself after death if and only if it is useful to other people and that's what i am trying to work on ... :)
    Best Regards,
    Abdetu...

  • Date / Time Column Display

    I want to be able to display within a JClient panel two separate fields - one a date and one a time, but I want both of these to reference a single database column, extracting the relevant portion of the data for display to the user.
    I have tried manipulating the entity but am coming across one or two problems when trying to update.
    Has anybody managed to achieve this kind of functionality within the BC4J/JClient framework ?
    Thanks.

    You may create two transient attributes on the entity which 'get their data' from the actual-persistent column and return just the date or just the time portions. On set of any of these transient-attributes, you should also update the persistent-attribute value with the approrpriate value.
    Then map these transient attributes on the VO and then on the JClient form to say two textfields.
    If you're encountering some specific problem/exception doing this, you may want to expand on your example/usage and the behavior seen so that we can simulate the scenario to provide further suggestions.

  • Group By date time columns

    I am trying to write a sql statement that will group datetime column in a result set by the number of days. Based on an input value I need to sum a number column where the data is grouped every x number of days. One run the result set may be calculated for data within every 5 day period the next run may be a 15 day period. How would you write a group by statement to accomplish this?

    select to_date(trunc(to_char(d,'J')/5)*5,'J'), sum...
    from...
    group by to_date(trunc(to_char(d,'J')/5)*5,'J')

  • How to remove time zone from date time column?

    Hello all,
    I have one birthday calendar list where I am showing birthdays of employees in acompany.
    Now when I display Date in a page I am getting the below output:
    Fri Sep 19 2014 00:00:00 GMT-0700 (Pacific Standard Time)
    Here I just want the below thing as an output:
    Fri Sep 19 2014
    the other things like 00:00:00 GMT-0700 (Pacific Standard Time)
    How should I achieve it?
    Thanks in Advance.

    Hi
    you should use XSLT datetime formatting
    http://amavs.wordpress.com/tag/formatdatetime/
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • How to combine date column and time column?

    Hello all,
    The question is pretty much as it says. I have two columns of data, one is in format 8/28/2014 and the other is in format 10:00 PM.  Both are formatted as text because I got frustrated with numbers forcing me to only format things as Date AND Time.  I want to be able to sort the list in chronological order, and I can't sub-sort columns. So, how can I combine them into one date+time column so that I can sort?
    Thanks!
    -acousticguitar7

    AG,
    If your Date is in A and your Time is in B, the formula to combine them would be:
    =A+TIMEVALUE(B)
    Jerry

  • Output triggred in the invoice with Date/Time 1

    Output triggred in the invoice with Date/Time as 1 i e Send with periodically scheduled job.
    So could you  let me know when this gets triggeed if we maintain 1 in condition record?
    Thanks,
    Praveen

    Hi Praveen,
    When you maintain 1in the Date/Time column in the Condition Records for O/P of say the Invoice it means that you are telling the system to send the O/P with periodically scheduled job.
    To achieve this you must use the report program RSNAST00.The message is processed through report program RSNAST00. This report program can be scheduled periodically or started manually.
    For scheduling periodically you need to set up a batch process in SM35.
    Hope this helps,
    J Nagesh

  • Strange one day adding to tasks due date (Outlook –SharePoint- MS Project integration)

    Hi,
    I have integrated MS Project 2010 with MS Outlook 2010 via SharePoint. Everything has gone more or less smoothly (as it could be for Microsoft
    J), but finally I got into a strange problem. Strangely enough,
    MS Outlook, while syncing tasks with SharePoint (these tasks are pre-created in MS Project and synced with SharePoint beforehand),
    adds one day to due dates of each of these tasks, e.g. for “Task 1” due date in MS Project and on SharePoint is 20.10.2010, but MS Outlook puts it as 21.10.2010, for “Task 2” due date in MS Project and on SharePoint is 22.10.2010, but MS Outlook
    puts it as 23.10.2010, etc.
    What is a strange trick? I have checked work time, holidays - everything is the same in MS Outlook, SharePoint and MS Project (8-17, Mon-Fri, 8 hours, 40 days a week). What could it be?
    Thanks a lot.

    Hi,
    It seems nobody can reply, so I will reply by myself because I found out the answer. The answer from Microsoft is pretty simple - ha-ha we know about,
    we will work on it, wait, ha-ha. Firstly let me quote Microsoft senior tech answer on the same request 3 month ago:
    "Hello Artur,
    The senior tech got back to me with the following conclusion:
    Outlook is rounding everything set to 12:00 PM or after to the next date because the columns mapped to start date and due dates are only Date columns,
    not date/time columns.
    It is rounding at noon because of the .5 decimal. This can be seen in Excel - 41115.5 = 7/25/2012 12:00 in date/time format whereas 41115.49 = 7/25/2012
    11:45.
    The issue seems to be an expected behavior, the next level of support is working on the same but currently I have not been provided with any ETA, so
    it looks like the issue will take a good amount of time to get fixed.
    I would appreciate your patience while we are working on the issue. I will keep you posted as and when I get an update on the issue."
    Sounds good, does not it? Ok. After asking this question recently I got run-around and finally I found the same question unsolved (see the quotation
    before) more than 3 month ago. I have sent it to Microsoft Tech Support. Look at reply I got from them on 22.10.2012:
    "This issue has been noticed and will be handled by the product team. Once we have any updates, it will be responded to you timely". 
    So the basic function does not work properly, there month passed - no way! Wait until what? I could hardly
    even imagine how Microsoft launched the product with such a bug and is not resolving the problem for months.

  • Maintain Date/Time Stamp in Export as XML

    Hello,
    I've create a report which has a field as mm/dd/yyyy HH:mm.
    When I export as .TXT .CSV, Excel ect it maintains the format; however when I export as XML I loose the formate and it exports as mm/dd/yyyy 12:00:00
    The below in anyother format or in BusinessObjects would be 09/04/2007  10:38.
    <COLUMN INDEX="6" ID="4" TYPE="Date" FORMAT="m/d/yyyy  hh:mm:ss  AM/PM">Actual Start (Date & Time)</COLUMN>
    <CELL INDEX="6">9/4/2007 12:00:00 AM</CELL>
    Any thoughts?
    As well is it possible to customize tags of the exported XML so it is more of a XML document then a spreadsheet.

    Thank you!
    For the issue with the Date/Time stamp is this a bug in older versions? I am using BusinessObjects 6.1; the only time it does this is when exported as XML
    Cheers,
    Tim
    Edited by: Tim Whitehead on Jul 13, 2008 7:17 PM

  • [b]Adding millisecond to a date[/b]

    Hi,
    I am creating a view out of a table and one of the view column is based on two table columns: one is a date/time column and the other is an integer column(containing milliseconds) in the table.
    My question is, how do i add the milliseconds to the date.
    i tried using Date + Interval, but the interval only takes seconds.
    Please note that the integer column containing milliseconds could be greater than 1000.
    Thanks,
    Vasu

    You'll have to modify this expression to cope with >= 1000 milliseconds.
    SQL> select cast (sysdate as timestamp) + cast ('0 00:00:00.' || millis as interval day to second) from (select 572 millis from dual);
    CAST(SYSDATEASTIMESTAMP)+CAST('000:00:00.'||MILLISASINTERVALDAYTOSECOND)
    02-AUG-03 10.47.01.572000000 AM
    d.

  • Changing Time Zone (stsadm tzmove) = Error: Adding a value to a 'datetime' column caused an overflow

    After updating timezone.xml и RGNLSTNG.xml files for my SharePoint 2010 (SP2 - 14.0.7015.1000)
    I have to run this command to Update time zone on calendar events:
    stsadm -o tzmove -name "russ2014" -update all
    But this cause an error: Adding a value to a 'datetime' column caused an overflow
    ULS log event: System.Data.SqlClient.SqlException: Adding a value to a 'datetime' column caused an overflow.  The statement has been terminated.
    How to fix this?

    Hi,
    Whether you added new time zone definition to your timezone.xml 
    and  RGNLSTNG.xml files.  if not, please provide the details about what content you updated in timezone.xml and RGNLSTNG.xml files.
    The stsadm.exe –o tzmove command does not work for new time zone definition changes. 
    This command is designed for making changes in the existing time zone, 
    not for creating a new time zone definition.
    After you modify the Timezone.xml and Regnlstng.xml files to include the new time zone definition, you must restart Internet Information Services (IIS).
     To do this, click Start, click Run, type
    iisreset in the Open box, and then click
    OK.
    Try to do IIS restart, compare the results.
    Best Regards,
    Lisa Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact 
    [email protected]

  • Finder window date added date modified show date time always

    Is there a preference setting to have a finder window with Date Added and Date Modified columns enabled to always show the date and time? Currently, the column information is dynamic, like just providing a time where you infer Today, or one column does show the date and time but the other only shows the date, or it reads Today, 12:31pm.
    I want every window when displaying Date Added or Date Modified columns to always, consistently show the date and time, e.g. 3/15/14, 7:31AM.
    Aloha and Mahalo!

    I found half of the answer: View:Show View Options - Deselect Use Relative Dates.
    Now I just need a solution to always show the time and not only the date.
    Curiously, when you initially enable a column in a Finder window, it shows both the date and time; however when you return to the window after closing it, you lose the time of day on Date Added, but not on Date Modified. -- Bug or Feature?

Maybe you are looking for

  • How do I transfer music from iPad to macbook?

    I've previously had all music etc on a PC with iPad, iPhone synced to that.  I want to transfer music from my iPad (as it's got all the CDs I laboriously added to my PC!) to my new macbook but can't find how to?  I did try to transfer directly from P

  • InDesign CS3 PDF Presets disappeared

    One of my Macs that has been working fine for a while has suddenly lost it's PDF Presets. I should maybe say misplaced, as they are available in the File>Adobe PDF Presets drop-down menu, but not via the Print dialog. Dual 2.3 G5, OS X 10.4.11, InDes

  • Meta Data in m4v files...

    Hi Everyone, I know this is one everyone asks but I can't find a bit of software that will do the job. I want to imbed meta data into my m4v files for the AppleTV 2. I've been using MetaX, and looked into MetaZ. MetaX works, but I would like to add t

  • Please help with aligning google button

    hi this is my website i have made, after making a few changes i have messed something up and now the google+ button has moved over to the right to much? i need to know how i can get the button to place above the facebook and twitter buttons where it

  • Trouble with deleting mail in Gmail

    Before I upgraded to iOS 5 last night, when I deleted an email in gmail using the mail app on my phone, it would move it into the trash.  From here I could delete it out of the trash, and it would be gone for good.  Since I've updated, when I move an