Timestamp to a string



I have to attach a timestamp to a string with optional date format. (
to create a file )

Eg:
String str = new("filenameMM-DD-YYYY.txt");
or
String str = new("filename.txt");

I need something like str.format(date) which would replace the date
format (if present ) with the current timestamp.

Any help ?

Thanks
Sandeep

.



Relevant Pages

  • Re: change the date string into timestamp
    ... > string into timestamp. ... > Time stamp means datestring will converted as seconds ... to specify a non-standard format, use a format string with the time.strftime ...
    (comp.lang.python)
  • Re: Php Date-Formatting Help
    ... > I have a date value that I pull from a .csv file. ... Returns a string formatted according to the given format string using the ... given integer timestamp or the current local time if no timestamp is given. ...
    (comp.lang.php)
  • Re: [PhP - dB] About Formatting a Date Result
    ... In the MySQL database the field is set to date not timestamp as you ... foresight has stored a string date instead of a timestamp, ... and can format your date to that used, in the config files, for any user ...
    (php.general)
  • Re: Importing a timestamp
    ... Try importing it as text, then write an Update query to remove everything ... field to the table and write another Update query to populate the Date/Time ... I have set the advanced to be the correct date format. ... > can not get the timestamp to import. ...
    (microsoft.public.access.gettingstarted)
  • Re: still having problems with dates
    ... Jonathan Crawford ... > Returns a string formatted according to the given format string using the ... > given integer timestamp or the current local time if no timestamp is ...
    (comp.lang.php)