Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: WXEX Weather Log File Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
MAWilsonPE
Newbie
Newbie
Avatar

Joined: May 30 2008
Location: United States
Online Status: Offline
Posts: 18
Posted: May 15 2010 at 07:51 | IP Logged Quote MAWilsonPE

I have created a log file to record hourly local weather history from Weather Exchange. I want to archive each day's history in a file with the date in the file name. How do I use the today() function in a file name?

ph_copyfile("c:\Program Files\WxEx\csv\history.log", "c:\Program Files\WxEx\csv\history-today().log", 1)

returns a file name of: history-today().log ;)

Thanks
Back to Top View MAWilsonPE's Profile Search for other posts by MAWilsonPE
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: May 15 2010 at 09:56 | IP Logged Quote TonyNo

I use this...

Code:
string( today(), "mmmm d") + " " + string(now(),"h.mm am/pm")


So try...

Code:
ph_copyfile("c:\Program Files\WxEx\csv\history.log", "c:\Program Files\WxEx\csv\history-"+string( today(), "mmmm d") + " " + string(now(),"h.mm am/pm")+".log", 1)
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
MAWilsonPE
Newbie
Newbie
Avatar

Joined: May 30 2008
Location: United States
Online Status: Offline
Posts: 18
Posted: May 15 2010 at 13:21 | IP Logged Quote MAWilsonPE

That Works! Thanks....
Back to Top View MAWilsonPE's Profile Search for other posts by MAWilsonPE
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum