Calculating a new Date and Time

I need to calculate a new date using an hour value eg:
Date : 23 March 2005 14:00 pm
Hours to be added: 12
Working hours : 8am - 5 pm
I need to calculate a new date/time using the working hours, so that the added time falls within those working hours.
Thanx...

No deal; create a Calendar object with your present date:
Calendar cal = Calendar.getInstance();
cal.set(2005,cal.MARCH,23,14,0,0);Add 12 hours:
cal.add(cal.HOUR,12);Check for weekend and add more days as long as it's not Monday:
while ((cal.get(cal.DAY_OF_WEEK) == cal.SATURDAY) || (cal.get(cal.DAY_OF_WEEK) == cal.SUNDAY)) {
  cal.add(cal.DATE,1);
}Check for working hours:
while (cal.get(cal.HOUR_OF_DAY) < startHours) {
  cal.add(cal.HOUR_OF_DAY,1);
while (cal.get(cal.HOUR_OF_DAY) > endHours) {
  cal.add(cal.HOUR_OF_DAY,-1);
}Not checked, but should run.

Similar Messages

  • UNDERSTAND THE NEW DATE AND TIME DATA TYPES IN ORACLE 9I

    제품 : SQL*PLUS
    작성날짜 : 2001-08-01
    UNDERSTAND THE NEW DATE AND TIME DATA TYPES IN ORACLE 9I
    ========================================================
    PURPOSE
    Oracle 9i 에서 소개되는 새로운 datetime data type 에 대해 소개한다.
    Explanation
    Example
    1. Datetime Datatypes
    1) TIMESTAMP
    : YEAR/MONTH/DAY/HOUR/MINUTE/SECOND
    2) TIMESTAMP WITH TIME ZONE
    : YEAR/MONTH/DAY/HOUR/MINUTE/SECOND/
    TIMEZONE_HOUR/TIMEZONE_MINUTE( +09:00 )
    or TIMEZONE_REGION( Asia/Seoul )
    3) TIMESTAMP WITH LOCAL TIME ZONE
    : YEAR/MONTH/DAY/HOUR/MINUTE/SECOND
    4) TIME WITH TIME ZONE
    : HOUR/MINUTE/SECOND/TIMEZONE_HOUR/TIMEZONE_MINUTE
    2. Datetime Fields
    1) YEAR/MONTH/DAY/HOUR/MINUTE
    2) SECOND(00 to 59.9(N) is precision) : Range 0 to 9, default is 6
    3) TIMEZONE_HOUR : -12 to 13
    4) TIMEZONE_MINUTE : 00 to 59
    5) TIMEZONE_REGION : Listed in v$timezone_names
    3. DATE 와 TIMESTAMP 와의 차이점
    SQL> select hiredate from emp;
    HIREDATE
    17-DEC-80
    20-FEB-81
    SQL> alter table employees modify hiredate timestamp;
    SQL> select hiredate from employees;
    HIREDATE
    17-DEC-80 12.00.00.000000 AM
    20-FEB-81 12.00.00.000000 AM
    단, 해당 Column 에 Data 가 있다면 DATE/TIMESTAMP -> TIMESTAMP WITH
    TIME ZONE 으로 Convert 할 수 없다.
    SQL> alter table employees modify hiredate timestamp with time zone;
    alter table employees modify hiredate timestamp with time zone
    ERROR at line 1:
    ORA-01439: column to be modified must be empty to change datatype
    4. TIMESTAMP WITH TIME ZONE Datatype
    TIMESTAMP '2001-05-24 10:00:00 +09:00'
    TIMESTAMP '2001-05-24 10:00:00 Asia/Seoul'
    TIMESTAMP '2001-05-24 10:00:00 KST'
    5. TIMESTAMP WITH LOCAL TIME ZONE Datatype
    SQL> create table date_tab (date_col TIMESTAMP WITH LOCAL TIME ZONE);
    SQL> insert into date_tab values ('15-NOV-00 09:34:28 AM');
    SQL> select * from date_tab;
    DATE_COL
    15-NOV-00 09.34.28.000000 AM
    SQL> alter session set TIME_ZONE = 'EUROPE/LONDON';
    SQL> select * from date_tab;
    DATE_COL
    15-NOV-00 12.34.28.000000 AM
    6. INTERVAL Datatypes
    1) INTERVAL YEAR(year_precision) TO MONTH
    : YEAR/MONTH
    : Year_precision default value is 2
    SQL> create table orders (warranty interval year to month);
    SQL> insert into orders values ('2-6');
    SQL> select warranty from orders;
    WARRANTY
    +02-06
    2) INTERVAL DAY (day_precision) TO SECOND (fractional_seconds_precision)
    : DAY/HOUR/MINUTE/SECOND
    : Logon time 확인시 주로 사용
    : day_precision range 0 to 9, default is 2
    SQL> create table orders (warranty interval day(2) to second);
    SQL> insert into orders values ('90 00:00:00');
    SQL> select warranty from orders;
    WARRANTY
    +90 00:00:00.000000
    7. Interval Fields
    - YEAR : Any positive or negative integer
    - MONTH : 00 to 11
    - DAY : Any positive or negative integer
    - HOUR : 00 to 23
    - MINUTE : 00 to 59
    - SECOND : 00 to 59.9(N) where 9(N) is precision
    8. Using Time Zones
    1) Database operation
    - Defined at CREATE DATABASE
    - Can be altered with ALTER DATABASE
    - Current value given by DBTIMEZONE
    2) Session operation
    - Defined with environment variable ORA_SDTZ
    - Can be altered with ALTER SESSION SET TIME_ZONE
    - Current value given by SESSIONTIMEZONE
    3) TIMESTAMP WITH LOCAL TIMEZONE
    - TIME_ZONE Session parameter
    : O/S Local Time Zone
    Alter session set time_zone = '-05:00';
    : An absolute offset
    Alter session set time_zone = dbtimezone;
    : Database time zone
    Alter session set time_zone = local;
    : A named region
    Alter session set time_zone = 'America/New_York';
    Reference Document
    ------------------

    Hi ,
    I am facing the same problem and my scenario is also same (BAPI's).
    So can you please tell me how you overcome this problem .
    Thanks,
    Rahul

  • How to enter a new Date and Time each day in a Numbers Spreadsheet...

    Hi... I have finally decided to move away from Excel and really give Numbers a shot... I have an application where each day I first enter the current date and time into a particular cell of a new row and then I enter some data in cells adjacent (in the same row) as that entered date-time. Then the next day I want to again enter the (new) current date and time and add more data next to that new date-time and so forth day after day... You can't use something as simple as =NOW() because then everyday, ALL of the date-times would change to the current time... Nope, now what I want... I just want to be able to EASILY and QUICKLY enter the current date-time value in one call and then have that specific value stay there forever... In Excel, this is accomplished with the keyboard shortcuts of
    <cntl> followed by a semicolon (;) for the date
    then enter a single space (for separation of date versus time) followed last by
    <command> followed again by a semicolon...
    So all together that is,
    <cntl><;><sp><command><;>
    and that puts something like
    4/10/2010 9:49:00 AM
    in a single cell...
    That's what I now want to be able to do in Numbers...
    How do I do that??? Do I use the menubar item "Insert Date and Time" and if so, how exactly do I get the current time to show up in the chosen cell??? With formatting??? Is there a keyboard shortcut method like the one I mentioned that works for Excel?? I've perused the manual and though I found lots on date-time, I didn't see how to do specifically what I want to do... I likely just missed it as surely it must be easy to do...
    Any feedback would be much appreciated... thanks... bob...

    Badunit wrote:
    The result of running that script is "UI Enabled = TRUE".
    I have cells named by the header values.
    This may be the problem.
    The script is an old one which deciphered only the letter+digit cell references.
    Here is a new version which works with every kind of cell reference.
    --[SCRIPT insertDateTime]
    Enregistrer le script en tant que Script : insertDateTime.scpt
    déplacer l'application créée dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
    Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
    Placez le curseur dans la cellule qui doit recevoir la date_heure
    menu Scripts > Numbers > insertDateTime
    La cellule pointée reçoit la date_heure.
    L'aide du Finder explique:
    L'Utilitaire AppleScript permet d'activer le Menu des scripts :
    Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
    Cochez la case "Afficher le menu des scripts dans la barre de menus".
    +++++++
    Save the script as a Script : insertDateTime.scpt
    Move the newly created application into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
    Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
    Put the cursor in the cell which must receive the date_time.
    menu Scripts > Numbers > insertDateTime
    The pointed cell receives the current date_time.
    The Finder's Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the "Show Script Menu in menu bar" checkbox.
    Yvan KOENIG (VALLAURIS, France)
    2009/03/01
    2010/04/11 is now able to treat every kind of cell references
    property theApp : "Numbers"
    --=====
    on run
    set {dName, sName, tName, rname, rowNum1, colNum1, rowNum2, colNum2} to my getSelParams()
    my doYourDuty(colNum1, rowNum1, tName, sName, dName)
    end run
    --=====
    on doYourDuty(c, r, t, s, d) (*
    c = columnIndex
    r = rowIndex
    t = table's name
    s = sheet's name
    d = document's name *)
    local cdt
    set cdt to my cleanThisDate(current date) (* the new date_time as a clean date_time *)
    tell application "Numbers" to tell document d to tell sheet s to tell table t
    set value of cell r of column c to cdt as text
    end tell -- application …
    end doYourDuty
    --=====
    on cleanThisDate(dt)
    (* ugly code but once I got date_time with milliseconds so if necessary, I drop them *)
    local l
    set l to my decoupe(dt as text, ":")
    if (count of l) > 3 then set dt to date (my recolle(items 1 thru 3 of l, ":"))
    return dt
    end cleanThisDate
    --=====
    on getSelParams()
    local r_Name, t_Name, s_Name, d_Name, col_Num1, row_Num1, col_Num2, row_Num2
    set {d_Name, s_Name, t_Name, r_Name} to my getSelection()
    if r_Name is missing value then
    if my parleAnglais() then
    error "No selected cells"
    else
    error "Il n'y a pas de cellule sélectionnée !"
    end if
    end if
    set two_Names to my decoupe(r_Name, ":")
    set {row_Num1, col_Num1} to my decipher(item 1 of two_Names, d_Name, s_Name, t_Name)
    if item 2 of two_Names = item 1 of two_Names then
    set {row_Num2, col_Num2} to {row_Num1, col_Num1}
    else
    set {row_Num2, col_Num2} to my decipher(item 2 of two_Names, d_Name, s_Name, t_Name)
    end if
    return {d_Name, s_Name, t_Name, r_Name, row_Num1, col_Num1, row_Num2, col_Num2}
    end getSelParams
    --=====
    set {rowNumber, columnNumber} to my decipher(cellRef,docName,sheetName,tableName)
    apply to named row or named column !
    on decipher(n, d, s, t)
    tell application "Numbers" to tell document d to tell sheet s to tell table t to return {address of row of cell n, address of column of cell n}
    end decipher
    --=====
    set { d_Name, s_Name, t_Name, r_Name} to my getSelection()
    on getSelection()
    local _, theRange, theTable, theSheet, theDoc, errMsg, errNum
    tell application "Numbers" to tell document 1
    repeat with i from 1 to the count of sheets
    tell sheet i
    set x to the count of tables
    if x > 0 then
    repeat with y from 1 to x
    try
    (selection range of table y) as text
    on error errMsg number errNum
    set {_, theRange, _, theTable, _, theSheet, _, theDoc} to my decoupe(errMsg, quote)
    return {theDoc, theSheet, theTable, theRange}
    end try
    end repeat -- y
    end if -- x>0
    end tell -- sheet
    end repeat -- i
    end tell -- document
    return {missing value, missing value, missing value, missing value}
    end getSelection
    --=====
    on decoupe(t, d)
    local l
    set AppleScript's text item delimiters to d
    set l to text items of t
    set AppleScript's text item delimiters to ""
    return l
    end decoupe
    --=====
    on parleAnglais()
    local z
    try
    tell application theApp to set z to localized string "Cancel"
    on error
    set z to "Cancel"
    end try
    return (z is not "Annuler")
    end parleAnglais
    --=====
    --[/SCRIPT]
    It's available on my idisk :
    <http://public.me.com/koenigyvan>
    Download :
    For_iWork:iWork '09:for_Numbers09:insertDateTime.zip
    Yvan KOENIG (VALLAURIS, France) dimanche 11 avril 2010 14:16:41

  • Date and Time adjustments for multiple photos

    Hello, thanks for providing the space for new users, and thanks in advance for your assistance.
    I am currently moving out of apple aperture/iphoto and across to lightroom 5.
    The OCD part of me likes to have my library organized, and I noticed that when I transferred my library across it is in a bit of a mess, so I am currently in the process of organizing the library and cleaning it up (approximately 18000 photos)
    Any how, I have almost settled on a folder structure (YYYY/MM - I feel for the number of photos I have trying to nut down to day might be to much - happy to receive advise on this also)
    For the most part, the photos have correct date and time from the commencement of the digital era (for me 2006 onwards)
    Photos pre 2006 are in negative form, and I am currently in process of having these scanned and imported into library, I have a batch done every month.  Adjusting the date and time from the creation date is where I am running into trouble.
    I have looked around the web and various forums to no avail.
    Firstly, I organize the photos into the correct order.  I then select the first photo and the then select the remaining photos.  I then select the adjust date/time from the menu and select the first option, adjust to new date and time, lets say 01/01/1990 at 1200 PM.
    The result I end up with is the first photo (the more selected photo if correct term) has 01/01/1990 @ 1200 as date and time, the remaining have 01/01/1990 as date (if I am lucky), and the times jump all over the place.  Sometimes it wont even change the date time for the remaining photos.
    What I am trying to achieve is either the same Date/Time for all the photos when I select a batch, or have them increment in time by a standard amount (i.e 1 minute (1200/1201/1202) or 1 second (1200:00/1200:01/1200:02)), and I just dont seem to be able to work this out to automatically do this, currently I have to achieve this by a manual adjusting each photo (some 200 at a time) which is really labor intensive
    Thanks in advance, and hoping an easy solution
    Regards
    Dean

    Thanks, that seemed to fix the problem.
    Workflow is:
    1) In grid view arrange photos in correct order
    2) Rename photos with a name & sequence (i.e. photos-1), this appears to then keep the photos organized as how I had arranged in grid view
    3) Export photos & delete original photos from my master library
    4) Open exported photos in an EXIF editor and change date & time to a common format (I am currently using the seasons as a guide, i.e. the photos that I recall being taken in spring are dated the first day of spring, using noon as the time)
    5) Import back to Lightroom and organizing as per my usual structure.
    This has allowed me to easily batch change date and times, keeping the correct order and has drastically reduce my workload, thanks for the suggestion!

  • There is something wrong with the volumes buttons in my macbook pro, every time i pressed the one who raises the volume, it leads me to the screen where (i do not no what its called) the background is black with the date and time and a calculator.

    There is something wrong with the volumes buttons in my macbook pro, every time i pressed the one who raises the volume, it leads me to the screen where (i do not no what its called) the background is black with the date and time and a calculator. However, when i lower it, my safari tab goes out of the screen. What do you guys think i should do? I'm getting very nervous.

    hey HAbrakian!
    You may want to try using the information in this article to adjust the behavior of your function keys to see if that resolves the behavior:
    Mac OS X: How to change the behavior of function keys
    http://support.apple.com/kb/ht3399
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • Get-Content and add Date and Time in a new file

    Hello,
    in a existing file I have data like:
    1;Idle
    5;chrome
    1;spoolsv
    Now I need to grab the content and add date and time in front of each line and save it to another file like:
    07.04.2015;10:18;1;Idle
    07.04.2015;10:18;5;chrome
    07.04.2015;10:18;1;spoolsv
    But I don't have any idea how I could solve this challange. Does anyone have a helping hand for me?
    Greetings

    Hello,
    If you need a new file with the desired output try this
    get-content .\current.txt | Foreach-Object{ $dntv = (get-date) ; "$dntv" + $_} | Out-File newfile.txt
    regards,
    V
    Venu

  • How do you date and time stamp iCal entries?  We share an event calendar and need to know when a new event was entered into iCal.

    How do you date and time stamp iCal entries?  We share an event calendar and need to know when a new event was entered into iCal.

    BKBK,
    Thank you for your response. That does adequately cover the
    client-originated sessions, but still leaves the ability I am
    looking for unavailable.
    It did serve to definitively answer my most pressing
    question, however, with this statement:
    Note: ColdFusion cannot create a session if an initiator
    application uses a SendGatewayMessage method to start an
    interaction with a client, such as an SMS user. In this case, the
    sending code must keep track (for example, in a database) of the
    messages it sends and their destinations. When a response event
    arrives, it can look up the origniatorID to determine whether it
    was in response to an outgoing message.
    I will play around with the Application scope to see if there
    might be a workable solution there.
    RLS

  • Date and time diffrence calculations

    Dear Experts,
    I have a doubt regarding the date and time diffrence calculation please help me out.
    This is regarding the report called u201CVehicle tracking systemu201D. The purpose of this report is to give the user information like how many vehicles have come in and how much time each vehicle has parked in the filling in the refinery and also the average time taken for a customer.
    For this we have created 4 info objects called
    1)     Park In Time
    2)     Park In Date
    3)     Gate Out Time
    4)     Gate Out Date
    We have created a routine which calculate the difference in Vehicle Park In Date & Time to Gate Out Time and Date
    The Time difference is number format.
    Example: For Vehicle1
    Park in Date and Park in Time are         27.11.2008 and 17:43:35
    Gate out Date and Gate out Time are     29.11.2008 and 09:36:16            
    Here routine will calculate the difference in the above date and time and the output is like this     1,155.138,000 (i.e. 1day, 15 hours 51 mins and 38 seconds) that means the vehicle has parked for 1 day and 15 hours etc.
    But we require the output like    1 day, 15:51:38
    Please give us the solution how to go about it.
    Thanks in advance,
    venkat

    Hi,
    I think in regard to your problem, the solution will be to make the variables in the query runtime by the replacement path variable.
    Please find the below link, its very much self explanatory and in regard to your problem.
    Hope it helps!
    [http://sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html]
    Regards,
    Neha.

  • Date and Time calculation in the Service Module

    Dear all,
    I have quite of a challenge here and i need serious guidance from your side.
    My client is in services industry and requires to calculate the date and time when the service call as to be closed. Not only it depends on the contract type the service is linked to but as well on the priority.
    The priority in Business One is unique, therefore we created a UDT (User Defined Table) to store the different 'response time' per contract/per priority. Example: a Platinum contract is always 24/7. But a gold contract priority 1 has to be closed in 240 minutes (4 workable hours) while a gold contract priority 2 has to be closed in 480 minutes (8 workable hours).
    I created 7 user defined fields on the Service Contract header that calculates the workable minutes per day. So if my coverage for Monday is from 8 AM to 4 PM, my UDF called DiffMon will show 480. For Tuesday, they start a bit later, and the coverage is 8:30 untill 16:00, therefore my UDF called DiffTue = 450.If the check box before the day in the Service Contract window is not ticked, then the UDF shows zero.
    I succeeded to calculate the expected closing time by using CASE WHEN statements as following, (all calculated in minutes):
         First, I need to check which day the Service call is created: A Monday or Thursday or... since my time coverage can change every day! I use SET DATEFIRST = 1 and compare today's date accordingly with my UDF DiffMon, DiffTue, etc.
         Then, When end of coverage time today Monday (4PM) minus the create time on the Service Call (1PM) is less then the time stored in my user defined table for that contract and that priority (i.e.480), then just add that to the create time and the create date (DateAdd(mi,...,...) ).
        When end of coverage time Monday (4PM) - Create time (1PM) + DiffTue(450) is bigger than 480, then I know I have enough time to solve my service call tomorrow Tuesday and I take the start time of Tuesday (8:30) + remaining time from yesterday (480-180 -> 180 = 3hours from 1PM to 4PM) and add that to the Create date + 1 so the end result will show Tuesday date and a time of 13:30
       Etc. untill I cover all possibilities based on which day is the service call created.
    NOW, I need to include the holiday table !!!!!!!!!!  And I can't foresee how the hell I am going to do that.
    The maximum coverage can go up to 60 hours, that means more than a working week! What happens if I have more than one bank holiday in that week period? What happens when my holiday table tells me that  date is a bank holiday but it is actually a Sunday and my contract is only running from Monday to Friday?
    Am I going straight to a big mess up?
    I will highly appreciate your comments,
    Regards,
    Frederic

    Hi,
    it is possible in query designer,
    u do the two things for getting the days between to dates
    1) in CMOD write the code for sy-datum create a customer exit variable in query as on caldate like eg zcedate
    when 'zcedate'.
    clear l_s_range.
    l_s_range-sign = 'i'.
    l_s_range-opt = 'eq'.
    l_s_range-low = sy-datum.
    append l_s_range to e_t_range.
    u write this code exit_saplrrso_001.
    it givs the sydatum
    2) then u create one more variable on zdate limit with replacement path
    then u go forto create the formula variable then it display ascreen there u select both customer exit variable and replacement path variable
    zcedate-replacementpathvariable
    it gives days i worked on this and succedded.
    like the same way fortime also u can do but here at the time of creating the customer exit varible u go for option as range here
    l_s_range-low = '20012009'
    l_s_range-high = '29012009'
    l_s_range-sign ='i'.
    l_s_range-opt = 'bt'.
    please try with the above one.
    Thanks & rEgards,
    k.sathish

  • Installed new Mountain Lion now Date and time do not update

    Hi,
    I have a new Macbook pro bought June 2011 and find that using Safari and playing a Flash Movie it will glitch the movie stallas and will nor play correctly.
    I see Kernel tasks are at 700 Mem and CPU at aaround 7%.
    So i reinstall a new downloaded system from Apple Mountain Lion.
    Stiil kernel Taskc are at 3 to 5% and and mem at 650meg
    I still get the glitches in the new Safari and now i see the Date and time shows but is frozen till i click in the data and time in the upper right hand corner of the screen it will then Upate the time.
    What is the problem here a clean install i see permissions have many errors after a clean install and will not fi, with disk utillities
    any help here please
    Thanks for any time given

    wersix wrote:
    How do I remove these? Do I just delete the folders using Finder? I'm new to Mac OS X.
    I'm seeing a number of posts about network printing problems after upgrading to Mountain Lion. I'm guessing the problem is something other than the drivers themselves.
    I sure appreciate your willingness to help me out with this!
    Yes, just delete the folders.
    There could be other problems, not driver-related, but updating to the most recent drivers will at least eliminate that possibility.
    Happy to try to help.

  • Every time I create a new row, I want a certain cell to display the date and time the row was created.  How do I do that?

    =NOW() updates the date and time continuously, I don't want to do that.  I just want the date and time in that cell to stay the same after that row is created.  Seems like this would be easy, but I can't figure it out.

    My preferred scheme is a variant of Barry's proposal 2
    create the new row
    select the cell in which you want to insert the date
    type the shortcut dedicated to one of the four "Insert date" services delivered with WordService from Devon Technologies (FREE)
    On a French keyboard, only one of the default shortcuts apply : cmd % which inserts the long date.
    But we may edit these shortcuts.
    Yvan KOENIG (VALLAURIS, France) mercredi 6 juillet 2011 15:12:16 iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • I am using Adobe Photshop Elements 11, I just transferred all of my data from an old computer to a new computer, all my pictures and documents transferred fine but, my albums are missing and the date and time that is usually under the picture are missing.

    I am using Adobe Photoshop Elements 11, I just transferred all of my data from an old computer to a new computer, all my pictures and documents transferred fine but, my albums are missing and the date and time that is usually under the picture are missing.. How do I get them back?

    Hi,
    Which operating system are you running on?
    The date & Time can be displayed by going to the View menu and checking Details - also File Names if you want them displayed.
    The Album information is saved within the catalog so it sounds as though you didn't do a catalog backup on the old computer and a catalog restore on the new computer which is the recommended way of transferring elements data. Did you just copy the photos over?
    Brian

  • Apple TV only showing trying to change date and time. I have recently changed to a new wifi provider and need to change the settings in tha ATV box.

    Apple TV only showing trying to change date and time. I have recently changed to a new wifi provider and need to change the settings in tha ATV box.

    Welcome to the Apple Community.
    Assuming this is not the first time you have used your Apple TV
    You might try restarting the Apple TV by removing ALL the cables for 30 seconds.
    Also try restarting the router. (Also try removing it’s power cord for at least 30 seconds)
    If the problem persists, try a restore, you may want to try the previous procedures several times before doing this.
    If restoring from the Apple TV doesn't help, try restoring from iTunes using a USB cable.
    If this is a new Apple TV, in addition to trying the above, it may also be that your network router is not allowing access to the timeserver, check that your router allows access over port 123.

  • Can not set date and time on a new Apple TV

    can not set date and time in a new appletv

    Hello lfsalas55,
    You may need to verify that TCP port 123 on your router is open and available for use by your Apple TV.
    Apple TV: TCP and UDP ports and protocols used
    http://support.apple.com/kb/HT2463
    Cheers,
    Allen

  • Trying to setup my new ATV and it won't set date and time, and won't allow me to log in with my apple ID.

    Trying to setup my new ATV and it won't set date and time, and won't allow me to log in with my apple ID to homeshare OR to test te network, which I know is correct since I changed it. I live in an apartment complex and the router is in my roommates room. ANY suggestions? I'm at the point where I may return this because it has been nothing but a hassle. I'm very annoyed and just want the product that I paid for to actually work.
    The ABOUT section says Network Time: Skipped (reachable) and Activation: Failed (skipped)
    I'm also using my MacBook Pro as the homesharing with iTunes up to date.

    I had a similar issue wuth my new Apple TV.  If you (or your roommate) are able to change the router firewall settings, do that first.  I don't know the ports that you need, except that 123 is one of them (to set the time).  Then restart the Apple TV.  See if that will get you through the activation process.  I actually ended up restoring mine to factory settings, but I'm not sure if that step was really necessary.
    I understand your frustration, though.  Getting the Apple TV to work was such a pain -- it almost feels like it is not really an Apple product.

Maybe you are looking for