to declare the variable as global use the option -g. Like this:
function f() {
  # ...
  declare -grx TIMESTAMP_FORMAT='+%Y-%m-%d %H:%M:%S'
  # ...
}
quote from help declare :
  -d create global variables when used in a shell function; otherwise
          ignored
Update After reading your last comment:
  Available outside the function and available in subshells
... it looks like export is the command you are looking for. Check this example:
function foo {
    export BAR="test"
}
# call function
foo
# will output 'test'
echo "$BAR"
# as the var is in environemt:
export -p | grep "BAR"
# ... it will be available from sub shells as well
Note: The export solution is missing the -r (read-only) feature from declare. If you can live with this, export should be ok.