+ Reply to Thread
Results 1 to 14 of 14

Correct date from time

  1. #1
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Correct date from time

    For a shift recording sheet i need date and time to set every 8 ours. Therefor i made a date and time cel that we fill in.
    The time is from the "dienst" cell. It wil generate the time in the cells.
    Ochtend 6:00, 7:00 8:00 9"00
    Middag 14 15 16 etc.

    But the date isn't looking at time. So in the night it wil not turn to the following day. Is there a better way to do this?

    Datum-tijd.jpg

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,640

    Re: Correct date from time

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,497

    Re: Correct date from time

    make a formula that adds 1 to the timevalue when the endtime is smaller then the begin time so that it does move to next day.

    Based on that screenshot it is impossible to tell what the formula should be exactly.

  4. #4
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Re: Correct date from time

    As you wish
    Last edited by Frigide; 02-01-2019 at 12:13 PM.

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,640

    Re: Correct date from time

    Please post on the forum. External links are unsafe and not all our members can access them. Thanks

  6. #6
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Re: Correct date from time

    Sorry but how?

  7. #7
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,640

    Re: Correct date from time

    Please read post #2, last sentence

  8. #8
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Re: Correct date from time

    Like this? Fancy forum!
    Attached Files Attached Files

  9. #9
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,497

    Re: Correct date from time

    The solution is simple:

    for cell A7 add the If formula from A8 to that cell
    for Cell b7 do = A7+1/24 and drag to right
    in row 8 put reference to row c7 and change format to show time only.

    Than date will change correctly.
    remember that a date is nothing more than a whole number and time is a fraction of 1. so you can do normal calculations addin 1/24 each cell will turnover the date if you add 1/24 to 23:00

    reformat the cells to number to see the true values of dates and times. showing as date is purely a formatting mask on a number. Where you decide yourself what you want to show as value. only date, only time or combination of date and time
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Re: Correct date from time

    Thank dude. How to Solve a topic?

  11. #11
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,497

    Re: Correct date from time

    Just below the topic title of the opening post there is a gray bar with a menu called "Thread tools" from that menu select Solved.

  12. #12
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Re: Correct date from time

    Is there a way to make the date and the first time in the sheet in one cell. So date en time in one cell

  13. #13
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Re: Correct date from time

    Quote Originally Posted by Roel Jongman View Post
    The solution is simple:

    for cell A7 add the If formula from A8 to that cell
    for Cell b7 do = A7+1/24 and drag to right
    in row 8 put reference to row c7 and change format to show time only.

    Than date will change correctly.
    remember that a date is nothing more than a whole number and time is a fraction of 1. so you can do normal calculations addin 1/24 each cell will turnover the date if you add 1/24 to 23:00

    reformat the cells to number to see the true values of dates and times. showing as date is purely a formatting mask on a number. Where you decide yourself what you want to show as value. only date, only time or combination of date and time
    Is there a way to make the date and the first time in the sheet in one cell. So date en time in one cell

  14. #14
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,497

    Re: Correct date from time

    in my sheet in cel A7 date and time are already in 1 cel,
    on A8 there is also date and time in one cell but I choose to present only time there

    All I did is apply a format mask to only show the date or time so that is simple to change.
    If you go to celproperties (cel eigenschappen) you can pick an appropiate date format that also has the time showing. so it is all in one cell

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] correct time and date formula and number of hours
    By mazan2010 in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 10-05-2016, 02:58 PM
  2. Time Stamp is not updating to correct time
    By buckles23 in forum Excel General
    Replies: 1
    Last Post: 09-03-2014, 11:22 AM
  3. Vba help needed to check date and time entry and correct if wrong
    By markharris2004 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-13-2014, 05:06 PM
  4. [SOLVED] Macro to correct time and date
    By reesjordan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-28-2013, 05:23 AM
  5. correct function to find a correct time value
    By jekidi in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-06-2013, 03:17 PM
  6. Userform to check Date/Time format correct before copying to worksheet
    By LoneWolf3574 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-16-2013, 05:14 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1