replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Output file with the date??
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Output file with the date??

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
kingkastle



Joined: 22 May 2008
Posts: 20

PostPosted: Thu Aug 14, 2008 9:56 am    Post subject: Output file with the date?? Reply with quote

Hi,

I�m working with files classified by date. The point is, I would like to put automatically the date into the output file created. I�m thinking about that, but I find no way. Any clue about that??

Thanks very much in advance
Best regards
Rafael
Back to top
View user's profile Send private message Send e-mail
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: D�sseldorf, Germany

PostPosted: Thu Aug 14, 2008 11:20 am    Post subject: Reply with quote

May be this helps?

character*8 edate@
character*120 file_name

file_name = ' '
file_name(1:9) = 'whatever_'
call append_string@(file_name,edate@())
call append_string@(file_name,'.ttt')

... where "whatever" is the textual file name and "ttt" is the file extension. The result is something like "whatever_14/10/2008.ttt"

Regards, Wilfried
Back to top
View user's profile Send private message
kingkastle



Joined: 22 May 2008
Posts: 20

PostPosted: Mon Sep 01, 2008 12:59 pm    Post subject: Reply with quote

Hi Wildfried,

It is still not clear for me, let�s see:

I got a file call HeatingAndTemperature_2008-08-13.csv

I open it and read it,
finally I want to create a file called HeatTempDONE_2008-08-13.csv
That keeps the date

In the explanation that you send me, It's not clear to me how to introduce automaticaly the date that appears in the input file into the output file.
Sorry Wildfried, but it�s not clear to me, I�m a begginer also....
But I still needed, your help is very appreciated,
maybe a clearly example?,
thanks anyway
best regards
Back to top
View user's profile Send private message Send e-mail
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: D�sseldorf, Germany

PostPosted: Tue Sep 02, 2008 9:35 am    Post subject: Reply with quote

Hi Rafael, try this:

Code:
      WINAPP
      OPTIONS(INTL)

      PROGRAM TEST

      IMPLICIT NONE
      INCLUDE <WINDOWS.INS>

      integer*4       i,l
      character*120   ifile,ofile

      ifile = 'HeatingAndTemperature_2008-08-13.csv'
      ofile = ' '
      ofile(1:13) = 'HeatTempDONE_'

      l = leng(ifile)
      do i = 120,1,-1
        if (ifile(i:i) .eq. '_') exit
      end do

      call append_string@(ofile,ifile(i+1:l))
      end

Best regards,
Wilfried
Back to top
View user's profile Send private message
kingkastle



Joined: 22 May 2008
Posts: 20

PostPosted: Tue Sep 02, 2008 11:04 am    Post subject: Reply with quote

Wilfried,

eternaly grateful!!!!!

I finally understood and already running it!!!!!!!

thanks very much

warmest regards
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

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


Powered by phpBB © 2001, 2005 phpBB Group