Difference in displaying date in MS Word field

I have a CV and would like to automatically update my age upon opening. So, what formula should I insert in the MS Word field?

Sort of:

{= {DATE} - {"01/01/1983"}}
+3
source share
4 answers

This is one of the best sites for working with Word field codes - http://www.addbalance.com/usersguide/fields.htm - and there are examples of how to create +/-.

Here's how you could calculate based on the month of birth of January and the year of birth of 1983.

{IF{DATE\@"MM"} >= 01 { = {DATE\@"YYYY"} โ€“ 1983 \#"00"} { = {DATE\@"YYYY"} โ€“ 1984 \#"00"}}

, IF = YEAR-1983. IF, , .

+2

, Word Excel, (, 05/18/1983 21.03.2012), Excel ( 01.01.1900 Excel 2013) , ( , , Excel), , ( 01/01/1900 - 1, 05/18/1983 - 30454 (... 00/01/1900 0!)).

, :

{= {DATE  \@ "YYYY"} - my_year - 1*{=OR({={DATE  \@ "MM"} < my_month};{=AND({={DATE  \@ "MM"} = my_month};{={ DATE  \@ "dd"} < my_day})})}  \* MERGEFORMAT}

:

  • {} Word ( ) CTRL + F9.
  • 'my_year', 'my_month' () 'my_day':
  • 4 ( , ), .
  • , : " my_year" , , my_month, , , my_day, .

MERGEFORMAT .

, , Word:

  • {} "Toggle Field Codes", (texte ) , ( ).
  • , , " ".
  • , , ( , ), "Toggle Field Codes" ( , void, , ).

18.05.1983 ( 1 , 01/01 18-, ):

{= {DATE  \@ "YYYY"} - 1983 - 1*{=OR({={DATE  \@ "MM"} < 05};{=AND({={DATE  \@ "MM"} = 05};{={ DATE  \@ "dd"} < 18})})}  \* MERGEFORMAT}
+3

. : . * 365 + * 31 + .

365. INT ( ROUND, 1 ).

{ = INT(({ DATE \@"YYYY" }*365 + { DATE \@"MM" }*31 + { DATE \@"dd" } 
      - (my_year*365 + my_month*31 + my_day)) / 365) \# "0" }
0
  • . "BirthDate"

enter image description here

  1. :

{={DATE \@ "yyyy"} โ€” {BirthDate \@ "yyyy"}}

0

Source: https://habr.com/ru/post/1743001/


All Articles