Calculate a Future Date in Word 2010

I am trying to insert a date field into Word 2010 so that tomorrow's date displays when the document is updated.  I have some field code that I gathered from other sites, but cannot get it to display the correct date.  Any help is appreciated.

You don't really need the full power of macropod's date fields for this one, but there are still a few things to think about. The following should do it, but you can probably simplify it. Test thoroughly! 
{ QUOTE { SET F "YYYY-MM-DD" }{ SET Y "{ DATE \@YYYY }" }{ IF { DATE \@MMDD } = 1231 "{ =Y+1 \#0000 }-01-01" "{ SET M "{ DATE \@MM }" }{ SET DI "{ Y }-{ M }-{ ={ DATE \@D }+1 \#00}" }{ IF "{
DI \@D }" = "{ DI }" "{ Y }-{ =M+1 \#00 }-01" "{ DI }" }" } \@{ F } }
Notes:
1. The SET F field sets up the format you want to use for the output date. You might use DD MMMM YYYY, for example
2. This formula relies on the fact that Word does not treat 2011-09-31 (say) as a valid date. So whereas "2011-09-30" \@D yields "30", "2011-09-31" \@D yields "2011-09-31"
3. It also relies on the fact that (AFAIK) "YYYY-MM-DD" is recognised correctly regardless of your Windows regional settings. At least, with the "Western" calendar.
Peter Jamieson

Similar Messages

  • Calculate future date in MM/dd/yyyy format

    Hi,
    I am trying to add a 56 months to a given date (MM/dd/yyyy string) and output the date in MM/dd/yyyy format.
    Here is my code:
                   SimpleDateFormat date = new SimpleDateFormat("MM/dd/yyyy");
                   date.parse("07/30/2000");
                   GregorianCalendar gc = new GregorianCalendar();
                   gc.add(Calendar.MONTH,+56);
                   System.out.println(date.format(gc.getTime()));  I tried to assign date.parse() to a Date but there is no fomat method on Date so to add months to the date. Could someone suggest me how to calculate a future date?

    thanks for looking, just found the answer:
                   SimpleDateFormat date = new SimpleDateFormat("MM/dd/yyyy");
                   Date dt = date.parse("07/30/2000");
                   GregorianCalendar gc = new GregorianCalendar();
                   gc.setTime(dt);         //this was missing
                   gc.add(Calendar.MONTH,+56);
                   System.out.println(date.format(gc.getTime()));

  • How do I Automatically Generate Dates 10 days in the future in letters in Word 2010?

    I use MS Word 2010.  I have a template that requires me to generate a date ten days in the future.  I have tried writing macros but I can't get them to work or run.  Clearly, I have no idea how to do this.  Can someone assist?

    To see how to do this and just about everything else you might want to do with dates in Word (using field coding instead of macros), check out my Microsoft Word Date Calculation Tutorial, at:
    http://windowssecrets.com/forums/showthread.php/154368-Microsoft-Word-Date-Calculation-Tutorial
    or:
    http://www.gmayor.com/downloads.htm#Third_party
    In particular, look at the item titled 'Calculate a day, date, month and year, using n days delay'. Do read the document's introductory material. Note too that, instead of using a plain DATE field, you'd probably need to use the CREATEDATE field.
    If you'd prefer a macro solution, post back.
    Cheers
    Paul Edstein
    [MS MVP - Word]

  • Can not edit data labels in old graph chart objects using Word 2010

    In Word 2010, Insert object "Microsoft Graph Chart", go to Chart Options and check an item in Data labels, such as "Series Name", "Category Name" or "Value". Click OK, then double-click on a data label to edit its
    settings, or right-click on a data label and select "Format Data Labels..."
    This makes Word to crash. The only way I can get out of it is by using the Task Manager to kill Word.
    This happens in Windows 7 and Windows 8. This does NOT not happen in Word 2007 nor Word 2013, so it seems specific to Word 2010. All our clients have the same problem, this does not seem related to a specific workstation configuration.
    The Microsoft Graph Chart are the old charts used within .doc files. I have an application still generating those types of files and need to edit data label settings manually before processing the files with my application.
    Also note that anytime you edit a .doc file in Word 2010 and you see "Compatibility Mode" in the title bar, the Insert / Chart option from the ribbon inserts an old type chart (same as if you use Insert / Object / Microsoft Graph Chart), not the
    new Word 2010 charts. You then have the same problem editing the data labels.
    The underlying Activex seems to be the Chart.Exe file, the one I have installed is 14.0.7012.1000. You can see the version by double-clicking the chart and then look in the Help / About menu.
    Any help will be greatly appreciated.

    As this is a configuration issue and not a programming issue I' moving your question to a more appropriate forum where you're more likely to find assistance.
    Cindy Meister, VSTO/Word MVP,
    my blog

  • FM to calculate future date

    Hi,
    Im looking for a function module to add number of days ( working days only ) to a given date and return me the resultant date.
    For example, input date 25.02.2009. I need to add 5 working days and the resultant date will be 04.03.2009.
    Thanks for the help

    Hi,
    The FMs of your interest would be:
    DATE_IN_FUTURE - Calculates a future or past date
    WDKAL_DATE_ADD_FKDAYS - Number of working days in a date range
    HOLIDAY_GET - All holidays in a factory calendar
    DATE_CHECK_WORKINGDAY - Determines if a single date is a working day
    There are no direct FM as far as i know. You can use the above FMs and write logic accordingly to get your desired result. Do search on the above FMs for their details.
    Cheers.

  • Calculate future dates

    Am looking for either a javascript or formcalc that will run at the client level to calculate future dates based on input into a base date.
    Example:
    Input: 30 April 2005
    Outputs:
    Next Event: Monday, 15 May 2005 (base date + 15 days)
    Next Event: Saturday, 29 June 2005 (base date + 45 days)

    I don't have such script but I have a few tips for you if you want to write a script that will do just that.
    - First, you can refer to the "input" date/time field by:
    inputDate = DateTimeField1.formattedValue;
    - You can then parse the date/month/year values
    var theYear = inputDate.substring(0,4);
    var theMonth = inputDate.substring(5,7);
    var theDay = inputDate.substring(8 );
    - Create a JS date object, useful for date manipulation.
    var dateObj = new Date();
    var baseDate = dateObj.getDate();
    var baseMonth = dateObj.getMonth();
    var baseYear = dateObj.getYear() + 1900;
    - Now you can implement a function called
    displayFutureDate(baseDate,baseMonth,baseYear,numberOfDays,outputObj)
    I leave the detailed implementation up to you. It would be a good and fun exercise.
    Good luck!

  • Hp d110 missing lines of print data using Microsoft Word 2010

    When printing a document using Microsoft Word 2010, some lines of print are missing in the print data

    Hello,
    I would suggest doing a hard reset with the printer. 
    Hard Reset:
    Take out the toner/cartridges
    Unplug the power cord from the printer and wall
    Wait 30 sec
    Plug the power cord back into the printer and wall (Make sure the printer is plugged into the wall and not a surge protector)
    Insert the toner/cartridges back into the printer
    Let me know the outcome

  • The appearence of tables in some Word 2010 documents changes after KB2880529

    I wanted to alert you that, since our company has applied
    KB2880529, some users are reporting Word 2010 documents (docx) having their appearence changed.
    More precisely, the issue concern the table inserted in the Word document : They are all messed up. For exemple, the begining of the table can look ok, then a few lines of the table are
    badly miss aligned (like moved 2 cm to the right), then you've got a few normal lines, then again several bads, and so on.
    Also, some of the cells, that were in the last column of the table, may appear half outside of the table.
    And the worse part is that, even if you take some time to manualy fix the table, when you save the document and re-open it, everything is bad again, and exactly as it was before... so basicaly
    the save doesn't work for the tables (it work if you change some text in the table, but not for the table itself (size of the columns, location of the columns, so on)).
    I can't profite any file because they are of a very sensitive nature and can't leave our company, even if I remove most of the content, our IT security doesn't allow it.
    Anyway :
    - we are absolutly sure it's
    KB2880529 that does that because when we uninstall the KB, and re-open the document, it look normal again.
    - it seems to concern only documents that were created using some old Word 2003 templates some time ago, and then opened in Word 2010. As far as I know it doesn't happens on 100% Word 2010
    documents.
    So, we are currently doing a package installed by SCCM 2012 in order to uninstall it on all the PC which received it a few days ago.
    Let's hope you'll correct that issue... and if possible that, in a near futur, you'll had a feature in SCCM 2012 to allow us to unintall KBs, like it was possible with WSUS.

    I'm sure there are some ways to fix the files one by one. Indeed, our tests indicate that it's possible, for exemple, to open them in "LibreOffice 4.2" (a fork of OpenOffice), which displays them correctly, and then save the file in .doc and then use
    Office 2010 to open this .doc and save it in .docx.
    But what I've forget to indicate is that the issue touch probably thousands of documents that have been placed in a "document management application" (I'm not sure how to correctly translate) over the years, documents that may be hundreds of users need to
    look at, for reference, from time to time... but basicaly the documents are "frozen" / archived, they must not be edited by anybody.
    I very much doubt you can expect MS to not apply updates, including via the next Service Pack, just because some tables in some of your documents are corrupt. Besides which, the same problem will quite likely resurface when you next upgrade to a newer version
    of Office. Ultimately, someone is going to have to check out all the documents with tables and verify their content. The scope of that project might be narrowed down after you've checked a few documents and found some common features between those with the
    corrupt tables. It's easy enough to write a macro to test the files to see which ones have tables. That can serve as the first step in narrowing the scope of the project. It's also possible have the macro that repairs the files restore their
    original time/date stamps if that's important.
    An entirely different approach would be to temporarily uninstall the update on one PC. Then use that PC to convert all the documents to PDF. Then use the PDFs in the "document management application". Since the documents "must not be edited by anybody" the
    PDF format is inherently more secure in that regard and can have security attributes set to prevent printing and/or content copying. The PDF format is also impervious to Word's tendency to change document layouts whenever you do little things like updating
    printers or changing between doc & docx formats.
    Cheers
    Paul Edstein
    [MS MVP - Word]

  • Provisioning a user in future date

    Hello,
    Creating a new user and provisioned to OID work properly.
    Now I would like to create a user with start date in the future. OIM when the value USR_START_DATE is on the future it update the USR_PROVISIONING_DATE too on the same future date but not execute the provisioning to OID and the USR_STATUS is "Disabled Until Start Date"
    If there any way to update the USR_START_DATE with a different USR_PROVISIONING_DATE and do the provioning as normal and keep USR_STATUS as Active.
    thanks
    TG
    Edited by: TG on 1-Nov-2010 9:48 AM

    Hello again,
    i'm using the Thor.API.Operations.tcUserOperationsIntf.createUser((java.util.Map arg0).
    arg0 will contain USR_PROVISIONING_DATE=today date and USR_START_DATE = to the future date.
    I apply what your propose and push the USR_PROVISIONING_DATE=today date and put it on the pre-insert in Users form.
    sorry it did not work, it change the value in USR_PROVISIONING_DATE to put the USR_START_DATE value and didn't provisioned
    thanks
    TG
    Edited by: TG on 1-Nov-2010 10:47 AM

  • How to disable the future dates in Date pick calendar - SQL Server Reporting Services

    Hi All, 
             I have a scenario to run the report only for the Past days, and i have datepick calendar as a parameter for selecting Start Date and End Date. I want to control the Users by not to select the Future Dates in the End Date. In Other Words, the user should not select beyond the Current Date,
    Is there any way for me to control it. Advance Thanks
    Regards,
    Sundarrajan.

    Hi
            Here is a solution for ur problem: put the below code in the script, and the add
    OnClientDateSelectionChanged="checkDate"
    in the calenderExtender... u ll get the answer nicely.. Happy coding..
    <script type="text/javascript">
    function checkDate(sender,args){
    alert("You cannot select a day greater than today!")
    sender._selectedDate = new  Date();
    sender._textbox.set_Value(sender.selectedDate.format(sender._format))
    }</script>

  • How to program mails to be sent in future date

    hi
    i would like to knwo how to program my mails to be sent in a future date.
    in the mail application and Outlook for Mac.
    (outlook for windows allows me to program de date a mail may be sent)
    best regards    

    You can use the Automator app to set an alarm on your calendar which sends the mail at a future time.
    It's simpler than it might sound.  This explains how:
    http://joannalaforet.wordpress.com/2010/02/08/schedule-mail-on-mac-the-easier-wa y-automator-ical-alarm/

  • Background jobs are scheduled in future date

    Hi
    A system which is used by a customer test system was installed and scheduled the jobs in 2010( in future date).
    Now we have changed the date to current date. But still all the background jobs are in future date.
    There are around 500 jobs are scheduled. And it not possible to reschedule one by one.
    Is there any way workaround to change it back to current date format.
    Best Regards,
    Jai

    Dear Jai,
    The jobs scheduler should have this dates changed to current.  If its a third party system which are running these batches, then be careful to convey the same message to the 3rd party.
    If its in SAP, then the schedule change date should execute your jobs. At the same time, ensure that the transports between the test systems match to the destination.
    Do let me know for any clarification.
    Thanks
    Madhu

  • System Message Shows in  Future Date

    Dear Experts,
    In Our SAP BI System , The System Message SM21 shows in Current & future date both problem messages
    SAP Server OS and SAP BI Application Time and date both are in sync
    The BI system which is connected to ECC PRD also having a sync
    Remote monitoring are not configured in this system,
    System Log: Local Analysis of GEEPASBIPRD                  2
    Date : 22.12.2010
    Time     Type Nr  Clt User         TCode Priority Grp N Text
    10:02:54 DIA  001 350 GPKWTHOFI03                 BY  E Invalid parameter ObjTooLar
    10:04:07 DIA  001 350 GPKWTHOFI03                 BY  E Invalid parameter ObjTooLar
                       System Log: Local Analysis of GEEPASBIPRD                  3
    Date : 02.01.2201
    Time     Type Nr  Clt User         TCode Priority Grp N Text
    20:20:84           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    20:20:84           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    20:20:84           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    20:20:84           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    20:20:84           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    20:20:84           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    20:20:90           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    20:20:90           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    40:20:81           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    40:20:81           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    40:20:81           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    40:20:81           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    40:20:81           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    40:20:81           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    71:31:41           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    71:31:41           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    90:20:84           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    90:20:84           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    90:20:84           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    90:20:84           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    90:20:84           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    90:20:84           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
                       System Log: Local Analysis of GEEPASBIPRD                  4
    Date : 03.01.2201
    Time     Type Nr  Clt User         TCode Priority Grp N Text
    00:20:85           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
    00:20:85           35  BIWREMOTE                  hB  Y Missng:TSL1TE,hBY):154 EXE
                      System Log: Local Analysis of GEEPASBIPRD
              C o n t e n t s
    Content            Page         Start          End
    Selection criteria   1
                         2  22.12.2010 10:02:54 22.12.2010 10:04:07
                         3  02.01.2201 20:20:84 02.01.2201 90:20:84
                         4  03.01.2201 00:20:85 03.01.2201 00:20:90
                         5  02.01.3201 01:23:65 02.01.3201 90:40:42
                         6  03.01.3201 00:40:41 03.01.3201 11:62:24
                         7  02.01.4201 01:22:30 02.01.4201 90:40:42
                         8  03.01.4201 00:40:41 03.01.4201 11:62:24
                         9  02.01.7201 11:42:21 02.01.7201 31:71:95
                        10  02.01.9201 01:22:30 02.01.9201 81:41:10
                        11  03.01.9201 00:95:23 03.01.9201 11:11:94
                        12  02.01.A201 01:22:30 02.01.A201 81:41:10
                        13  03.01.A201 00:95:23 03.01.A201 11:62:24
                        14  02.01.E201 11:24:13 02.01.E201 71:50:52
                        15  02.01.I201 01:22:30 02.01.I201 81:41:10
                        16  03.01.I201 00:95:23 03.01.I201 11:62:24
                        17  02.01.R201 01:22:30 02.01.R201 81:41:10
                        18  03.01.R201 00:95:23 03.01.R201 11:62:24
    Contents            19
    Thanks
    Jai

    Hi Thahir,
    I deleted the SLOG and Restarted the system now its not showing the future date,
    Issue resolved.
    Thanks ,
    Jai

  • Acrobat XI Pro and MS Word 2010 file conversion issues

    I have created a photo journal comprised primarily of photo collages and text boxes using Microsoft Word 2010.  Acrobat XI Pro is installed as well.  When I "Save as Adobe PDF" the resulting PDF is missing many - not all - of the text boxes placed on top of the photos, and the some of the photos themselves are "reordered" - the one placed on top moves to the back.  What might be causing this?
    If I select "Save As" and then select the "PDF" option from Word's dropdown menu, the resulting PDF - which is much smaller than the one created by the "Save the Adobe PDF" option - retains all the data in the Word file, in the correct order.
    Note - this did not happen when I was using Acrobat X Pro.  And this  file I am currently working with converted perfectly to an Adobe PDF when I was still using Acrobat X Pro.

    Hi,
    Can you please share your test file because the issue you mention here seems to be file specific?

  • Excel 2010 temp Files do not delete on network share automatically when closed *Word 2010 do!*

    Hi,
    saw this post in similar Versions but never with a "cool solution" :)
    We got NetApp 2050 as Filer in a Windows Server 2008 R2 Domain with Windows 7 Clients and Office 2010 Pro Plus, all up to date with WSUS.
    If I open an Excel 2010 sheet on the Netapp Share or a Share on the Domain Controller and close it, it do not delte the temp file.
    Same to PowerPoint 2010.
    But with Word 2010, this works!
    Therefor I don't think, this will be the NTFS permissions or Network issues.
    We also got VMware Clients with Windows 7 and Office 2010. There the issue does not occure!!!
    May be something in Group Policies? Could it be some Microsoft Updates?
    I'm very interested in your opinions...
    Best regards...

    Hi,
    As far as I know, the issue usually caused by the anti-virus actively scanning Excel files (XLS, XLSX, or XLSM files). Please try to make the anti-virus to not actively scan Excel files.
    Then, if you are using Kaspersky 2009, I recommend we try the below method:
    Go to Run>Regedit>Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\KLIF\Parameters>Create the key  NonCachedIo (Type: Dword Value:1)
    Next, some other customer solved the issue by turning off the index with the effected folders.
    Hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

Maybe you are looking for

  • Notification sync

    I have had my notifications sync between my iPhone and iPad for a while now, but the notifications do not sync on my MBP. Notifications I am referring to would be Facebook, LinkedIn and Twitter.  I'm running OSX Mavericks on the MBP and iOS 8.1.3 on

  • Help with adjusting spacing between thumbnails and image in slideshow

    How can I adjust the spacing on the slideshow page? Customer wants more space between the thumbnails at the top and the image(s). Can I move the image & navigation tool or adjust the image size relative to the thumbnails and navigation tool at the bo

  • How do I join multiple mp4 files?

    I have three mp4 files created from a dvd. I'd like to join them into one mp4 file to put on our iPod. Is there a shareware utility to handle this? Thanks, David

  • This is getting absurd.

    HP: seriouly?  My girlfriend just installed the driver package for her all-in-one printer. I have become resigned to the fact that companies will make you jump through hoops in order to use their products, and accordingly decided to look for what els

  • Preview and DataSets

    I have been using Crystal Reports 2008 Basic that comes with Visual Studio 2008 and have successfully been building reports. However due to the functionality restrictions in the Basic version I have decided to trial the full version. My main issue ha