View previous topic :: View next topic |
Author |
Message |
kingkastle
Joined: 22 May 2008 Posts: 20
|
Posted: Thu Aug 14, 2008 9:56 am Post subject: Output file with the date?? |
|
|
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 |
|
 |
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: D�sseldorf, Germany
|
Posted: Thu Aug 14, 2008 11:20 am Post subject: |
|
|
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 |
|
 |
kingkastle
Joined: 22 May 2008 Posts: 20
|
Posted: Mon Sep 01, 2008 12:59 pm Post subject: |
|
|
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 |
|
 |
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: D�sseldorf, Germany
|
Posted: Tue Sep 02, 2008 9:35 am Post subject: |
|
|
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 |
|
 |
kingkastle
Joined: 22 May 2008 Posts: 20
|
Posted: Tue Sep 02, 2008 11:04 am Post subject: |
|
|
Wilfried,
eternaly grateful!!!!!
I finally understood and already running it!!!!!!!
thanks very much
warmest regards |
|
Back to top |
|
 |
|