Forums
This topic is locked
rename uploaded files with date and time
Posted 16 Jun 2003 05:41:52
1
has voted
16 Jun 2003 05:41:52 Marco Aramburo posted:
i need to remane a uploaded file with the date and time. i tried to use <%=date()%> & <%=time%> but i get an error page, what i have to write in the rename mask?Marco Aramburo
Replies
Replied 17 Jun 2003 00:09:41
17 Jun 2003 00:09:41 Lee Diggins replied:
Hi Marco
Try this:
<%
dim myDate
dim myTime
dim myFile
myDate = split(CStr(date()),"/"
myTime = split(CStr(time()),":"
myFile = (myDate(0) & myDate(1) & myDate(2) & myTime(0) & myTime(1) & myTime(2))
Response.Write(myFile)
%>
Digga
Sharing Knowledge Saves Valuable Time!!!
Try this:
<%
dim myDate
dim myTime
dim myFile
myDate = split(CStr(date()),"/"

myTime = split(CStr(time()),":"

myFile = (myDate(0) & myDate(1) & myDate(2) & myTime(0) & myTime(1) & myTime(2))
Response.Write(myFile)
%>
Digga
Sharing Knowledge Saves Valuable Time!!!
Replied 17 Jun 2003 00:36:01
17 Jun 2003 00:36:01 Marco Aramburo replied:
Digga
i have two more questions.
1. how can i take of the AM o PM
2. how can i get this in the rename uploaded extension part of the file upload add on pack?
I try this myFile & "imggru_.##ext##"
Thanks a lot
Marco Aramburo
Marco Aramburo
i have two more questions.
1. how can i take of the AM o PM
2. how can i get this in the rename uploaded extension part of the file upload add on pack?
I try this myFile & "imggru_.##ext##"
Thanks a lot
Marco Aramburo
Marco Aramburo
Replied 17 Jun 2003 00:44:25
17 Jun 2003 00:44:25 Marco Aramburo replied:
Digga
I solve the insert in the rename uploaded extension y only need now the first point, how can i take of the PM o AM?
Marco Aramburo
I solve the insert in the rename uploaded extension y only need now the first point, how can i take of the PM o AM?
Marco Aramburo
Replied 17 Jun 2003 01:25:05
17 Jun 2003 01:25:05 Marco Aramburo replied:
problem solved
i insert this porton of code to delete the AM, PM termination
<%
dim myDate
dim myTime
dim myFile
myDate = split(CStr(date()),"/"
myTime = split(CStr(time()),":"
myFile = (myDate(0) & myDate(1) & myDate(2) & myTime(0) & myTime(1) & myTime(2))
myfile = replace(myfile,"AM",""
myfile = replace(myfile,"PM",""
%>
Marco Aramburo
i insert this porton of code to delete the AM, PM termination
<%
dim myDate
dim myTime
dim myFile
myDate = split(CStr(date()),"/"

myTime = split(CStr(time()),":"

myFile = (myDate(0) & myDate(1) & myDate(2) & myTime(0) & myTime(1) & myTime(2))
myfile = replace(myfile,"AM",""

myfile = replace(myfile,"PM",""

%>
Marco Aramburo