# Add timestamp to file name

**URL:** https://www.finalbuilder.com/forums/t/add-timestamp-to-file-name/1525
**Category:** Discussion
**Created:** [July 14, 2010, 7:19am UTC](https://www.finalbuilder.com/forums/t/add-timestamp-to-file-name/1525 "2010-07-14T07:19:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hsosa](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/hsosa/32/91_2.png) [@hsosa](https://www.finalbuilder.com/forums/u/hsosa)
#### Post date: [July 14, 2010, 7:19am UTC](https://www.finalbuilder.com/forums/t/add-timestamp-to-file-name/1525/1 "2010-07-14T07:19:07Z")

</div>

I'm trying to add a timestamp to a file name. This is only working for the default value. The Get DateTime action is not picking up the current time. I'm using FB 5.5.

So I first set my variable like this:

![1_VariableEditor.jpg](https://www.finalbuilder.com/forums/uploads/default/original/2X/2/2f4a18bc4dddc3a7fcf1baf097a0143a314cd6a8.jpeg)

Then, I setup the Get DateTime action like this:

![2_GetDateTimeAction.jpg](https://www.finalbuilder.com/forums/uploads/default/original/2X/7/7efd48c5f56a4260b384e9493ac4ca6e3ab5fa50.jpeg)

Last, I add this variable as part of the zip archive name, like this:

![3_CreateArchive.jpg](https://www.finalbuilder.com/forums/uploads/default/original/2X/e/e8e3ea18f114c1266ca6c7aa54071b6c4d51555b.jpeg)

The %MyTimeStamp% variable only gets expanded, if there is a default value. I want this to use the current time when the FB project is run. Am I doing this right? If not, is there another way of doing this?

Thanks!

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [July 14, 2010, 10:43am UTC](https://www.finalbuilder.com/forums/t/add-timestamp-to-file-name/1525/2 "2010-07-14T10:43:27Z")

</div>

Hi Hector,   
  
 Turn off ‘Is Macro’ option for the variable.   
  
 When enabled the variable will be treated as a “macro” or “function”. It’s value will be re-evaluated every time it’s accessed and can only be set when the variable is defined.   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![hsosa](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/hsosa/32/91_2.png) [@hsosa](https://www.finalbuilder.com/forums/u/hsosa)
#### Post date: [July 15, 2010, 1:08am UTC](https://www.finalbuilder.com/forums/t/add-timestamp-to-file-name/1525/3 "2010-07-15T01:08:47Z")

</div>

That did it. Thanks!
