Page 1 of 1 1
Topic Options
#120382 - 2004-05-28 06:22 PM @DATE
Diogo Offline
Lurker

Registered: 2004-05-28
Posts: 2
Hi,

I need to generate a log. The log name need to contain a date.

For exemple:

xpto20040528.log

How I can do this ??

Thanks

Top
#120383 - 2004-05-28 06:51 PM Re: @DATE
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Code:

$LogfileName = "xpto" + @DATE + ".log"



If you're looking for script to create/write a logfile check the UDF forum for several usable functions.

Top
#120384 - 2004-05-28 06:53 PM Re: @DATE
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Use Split() to remove the whacks. Lots of examples posted on this board.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#120385 - 2004-05-28 07:05 PM Re: @DATE
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Ah, what the hay... feeling generous.

$LogfileName = "xpto" + Join(Split(@DATE,'/'),'') + ".log"
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#120386 - 2004-05-28 07:11 PM Re: @DATE
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Sorry about the whacks, I'm doing to much multi-tasking.
Top
#120387 - 2004-05-28 07:12 PM Re: @DATE
Diogo Offline
Lurker

Registered: 2004-05-28
Posts: 2
Can I make this form ?

IF Open(1,"\\servername\share\" + $LogfileName,5)=0
;
$x=WriteLine(1,"$consChave"+Chr(13)+Chr(10))
; Close(1)

Top
#120388 - 2004-05-28 07:17 PM Re: @DATE
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Do not wrap vars in quotes. Use @CRLF macro.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1114 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.056 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org