# Behavior of Get Date

**URL:** https://www.finalbuilder.com/forums/t/behavior-of-get-date/1688
**Category:** Discussion
**Created:** [January 20, 2011, 7:17am UTC](https://www.finalbuilder.com/forums/t/behavior-of-get-date/1688 "2011-01-20T07:17:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nelsonwolf](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/b9e5f3/32.png) [@nelsonwolf](https://www.finalbuilder.com/forums/u/nelsonwolf)
#### Post date: [January 20, 2011, 7:17am UTC](https://www.finalbuilder.com/forums/t/behavior-of-get-date/1688/1 "2011-01-20T07:17:37Z")

</div>

&nbsp;Hi,

I'm using GetDate and the onGetDate script. &nbsp;I modify ModifiedDate to be in a different format. &nbsp;However this is never saved back to the result variable. &nbsp;Is it supposed to save back? &nbsp;Currently I'm using this statement to work around, but I wasn't sure if this was the intended behavior or not.

eval(ActionProperties.ResultVariable + " = '" + ModifiedDate + "';");

-Nelson

---

<div class="post-metadata">

### Author: ![stephen.ryan](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/f14d63/32.png) [@stephen.ryan](https://www.finalbuilder.com/forums/u/stephen.ryan)
#### Post date: [January 20, 2011, 10:52am UTC](https://www.finalbuilder.com/forums/t/behavior-of-get-date/1688/2 "2011-01-20T10:52:14Z")

</div>

Hi Nelson   
  
 I think the problem is here is that ActionProperties.ResultVariable only allows you to reference the name of the variable specified in the action, it cannot be used to assign a value to this variable.   
  
 The easiest way to achieve what you want to do is:   
  
 FBVariables.MyVariable = ModifiedDate;   
  
 Or you can also use the FBFormatDateTime function in this statement:   
  
 FBVariables.MyVariable = FBFormatDateTime(“HH:MM”, ModifiedDate);   
  
 Hope this helps,   
  
 Regards,   
 Steve

---

<div class="post-metadata">

### Author: ![nelsonwolf](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/b9e5f3/32.png) [@nelsonwolf](https://www.finalbuilder.com/forums/u/nelsonwolf)
#### Post date: [January 21, 2011, 1:24am UTC](https://www.finalbuilder.com/forums/t/behavior-of-get-date/1688/3 "2011-01-21T01:24:03Z")

</div>

Hi Steve,   
  
 My eval statement actually achieves what I’m trying to accomplish. What I am avoiding is having to place the variable I want to use in the dialog AND in the script events. I copy and paste my actions around a lot and having to remember that I need to change a variable name in 2 places is inconvenient at best.   
  
 My question is about the function of OnGetDate. Is ModifiedDate intended to be a read only value, or should modifying it cause my Result Variable to change. I would think the latter, but I wanted to check since it is not clear in the help file.   
  
 -Nelson

---

<div class="post-metadata">

### Author: ![stephen.ryan](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/f14d63/32.png) [@stephen.ryan](https://www.finalbuilder.com/forums/u/stephen.ryan)
#### Post date: [January 21, 2011, 4:53am UTC](https://www.finalbuilder.com/forums/t/behavior-of-get-date/1688/4 "2011-01-21T04:53:10Z")

</div>

Hi Nelson   
  
 Sorry for the misunderstanding, I can see your reason for doing this now.   
  
 ModifiedDate is read only, any value that you assign to this within the OnGetDate event will have no affect. I would recommend assigning this to a local variable within your script which you modify and include as a part of the eval statement.   
  
 Regards,   
 Steve
