Jul 10, 2002 #1 ohmbru Technical User Jul 13, 2001 161 US I transfer a file daily called 'pending.dat' How can I make the file name reflect the current date: 'pending0710.dat' Brian
I transfer a file daily called 'pending.dat' How can I make the file name reflect the current date: 'pending0710.dat' Brian
Jul 10, 2002 #2 Rolliee Programmer Jun 23, 2002 1,551 US Use month and day from now(). MsgBox Weekday(Now()) MsgBox Day(Now()) Just gave me 4 and 10. Rollie Upvote 0 Downvote
Jul 10, 2002 #3 scking Programmer Jan 8, 2001 1,263 US Using just the date would return a part of the filename which could not be used to create a legal filename. sFilename = "Pending" & Date & ".dat" ?"Pending" & Date & ".dat" Pending7/10/2002.dat If you want only the 710 then use a small function to get it. Public Function GetDatePart() As String GetDatePart = Month(Date) & Day(Date) End Function ?Month(Date) & Day(Date) 710 ---------------------- scking@arinc.com Life is filled with lessons. We are responsible for the results of the quizzes. ----------------------- Upvote 0 Downvote
Using just the date would return a part of the filename which could not be used to create a legal filename. sFilename = "Pending" & Date & ".dat" ?"Pending" & Date & ".dat" Pending7/10/2002.dat If you want only the 710 then use a small function to get it. Public Function GetDatePart() As String GetDatePart = Month(Date) & Day(Date) End Function ?Month(Date) & Day(Date) 710 ---------------------- scking@arinc.com Life is filled with lessons. We are responsible for the results of the quizzes. -----------------------