internetcreations
asked on
Variable data in properties file?
Hello,
I'm trying to set a variable value in a Java properties file. I want it to incorporate current datetime in the value. Here's an example:
#Begin my.properties
a=yyyymmddhhmmss_123
#End my.properties
where 'yyyy' is the current year, 'mm' the current date, and so on.
I'm sure it's relatively simple, but I'm relatively muddleheaded today. Thanks for your help!
I'm trying to set a variable value in a Java properties file. I want it to incorporate current datetime in the value. Here's an example:
#Begin my.properties
a=yyyymmddhhmmss_123
#End my.properties
where 'yyyy' is the current year, 'mm' the current date, and so on.
I'm sure it's relatively simple, but I'm relatively muddleheaded today. Thanks for your help!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Use the following to format your entries, and the code postyed by nathana21 to read/updatye and write your Properties.
:-)