Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-15-2016, 01:01 AM
tinfanide tinfanide is offline IF in field codes? Windows 7 64bit IF in field codes? Office 2010 32bit
Expert
IF in field codes?
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default IF in field codes?

Code:
{ IF SAVEDATE="" DATE SAVEDATE  \@ "yyyy/MM/dd" }
If I want to:

If SAVEDATE is nothing (i.e. the document has not yet been saved), it should show today's date while if SAVEDATE is available (i.e. the document has been saved), the savedate codes should follow the format "yyyy/MM/dd".

But the field codes in quotes return nothing. What should I do to fix it?



Many thanks!
Reply With Quote
  #2  
Old 09-15-2016, 06:19 AM
Charles Kenyon Charles Kenyon is online now IF in field codes? Windows 8 IF in field codes? Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,125
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by tinfanide View Post
Code:
{ IF SAVEDATE="" DATE SAVEDATE  \@ "yyyy/MM/dd" }
If I want to:

If SAVEDATE is nothing (i.e. the document has not yet been saved), it should show today's date while if SAVEDATE is available (i.e. the document has been saved), the savedate codes should follow the format "yyyy/MM/dd".

But the field codes in quotes return nothing. What should I do to fix it?

Many thanks!
Try
Code:
{ IF {SAVEDATE}="" {DATE } {SAVEDATE} \@ "yyyy/MM/dd" }
See Date Calculation Tutorial.
Fields in Word are not the same as in Excel.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF in field codes? New to Field Codes Panzer336 Word 2 04-11-2016 07:57 AM
IF in field codes? Need help with Field Codes Cosmo Mail Merge 25 07-30-2015 01:25 PM
Copying Raw Field Codes ptmuldoon Word 3 01-04-2015 02:50 PM
IF in field codes? How to hide field codes from others? lucky16 Word VBA 2 10-24-2014 03:52 AM
Formula Field using Field Codes hunter2193 Word 3 04-05-2013 04:58 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:27 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft