Home > ASP Development > remove weekday from date

remove weekday from date



sorry for repost .its urgent.i used formatdatetime function with vblongdate as per as my need.but in this i dont want weekday from date means monday tuesday.................pls



thanxs

<%

prior = Request("Date")



If isDate(prior) Then prior = CDate(prior) Else prior = #1/1/1900#



For dt = DateAdd("m",-1,Date()) To Date-1

'x=FormatDateTime(dt, vbLongDate)

'x1= Month(dt)



%>

<OPTION value="<%=dt%>" <%If dt = prior Then response.write "SELECTED" %>><%=FormatDateTime(dt, vbLongDate)%> </option>

<%

Next

%>

</SELECT></center> </td>

</tr>

    
Guest


This is a QAD example,




Code:



strTest = formatDateTime(now(), vbLongDate)
strReg = "(monday|tuesday|wednesday|thursday|friday|saturday |sunday), "

' Prove day in date
response.write strTest & "<br>"

set regRepl = new regexp
regRepl.pattern = strReg
regRepl.ignoreCase = true
regRepl.global = true
strNew = regRepl.replace(strTest, "")
response.write strNew






strNew is the date without the day

Was this answer helpful ? Yes No   
Guest


thanx elija.........once again great job .its now perfect..............

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved