Hello,
This is the vbscript show the date in the format "10-may-2008"
below is the vbscript
<script language="vbscript" for="VALID_DATE" event="onblur">
dim tempDate1
dim tempDate2
dim monthsToAdd
dim VTDate
dim lstrDay
dim lstrMonth
dim lstrYear
monthsToAdd = 12
tempDate1 = Date()
VTDate = dateAdd("m",monthsToAdd,te
mpDate1)
lstrDay = Day(VTDate)
lstrMonth = MonthName(Month(VTDate),tr
ue)
lstrYear = Year(VTDate)
'If the Day is less than 9 then we will add a 0 to it
if lstrDay < 9 then
lstrDay = "0" & lstrDay
end if
VTDate = lstrDay & "-" & lstrMonth & "-" & lstrYear
document.VALID_DATE.value = VTDate
</script>
I want to implement this in vb.net in my code-behind. how should i convert this.
any help would be appreciated
thank you,
anagm
Start Free Trial