Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

add date in function

Posted on 2014-02-12
5
Medium Priority
?
238 Views
Last Modified: 2014-02-12
hi, i wanna add a date (asp) in a function, how do i do that?

so every month, it will be updated automaticly (10/current month/current year)


thx


<%
function invitation (lng)
	
	
	select case lng
	case "fr"
		invitation = invitation & "<p>Welcome..... </p>"
		invitation = invitation & "<P><span class=title_2>answer before 10/here current month/here current year</span></P>"	

		
	
	case "nl"
		invitation = invitation & "<p>Welcome 2 </p>"
		invitation = invitation & "<P><span class=title_2>Vul je cijfers in voor 01/01/2014</span></P>"	

	end select
end function
%>
  

Open in new window

0
Comment
Question by:fedkris
  • 3
  • 2
5 Comments
 
LVL 34

Expert Comment

by:Big Monty
ID: 39853556
what dates do you want to add? 10 days to the current date?
0
 
LVL 34

Expert Comment

by:Big Monty
ID: 39853564
or do you just want the current month and year to display?

invitation = invitation & "<P><span class=title_2>answer before 10/<%=Month( Now )%>/<%=Year( Now )%></span></P>"
0
 

Author Comment

by:fedkris
ID: 39854641
but the code, is already between <%

function....

%>


it doesn't work... i tried that also, before...
0
 
LVL 34

Accepted Solution

by:
Big Monty earned 2000 total points
ID: 39854657
you're right, my mistake. try this (assuming it's what you want, you never really clarified my question):

invitation = invitation & "<P><span class=title_2>answer before 10/" & Month( Now ) & "/" & Year( Now ) & "</span></P>"
0
 

Author Closing Comment

by:fedkris
ID: 39854684
thx!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Loops Section Overview
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question