Running procedures in vb.net
hi:
im building a vb.net web based application. one of the forms executes a procedure when clicking the button.
i want teh below procedure to run:
" Execute Calculate_RL ('31-AUG-2005'); "
i get the date from the user as 31-8-2005. how do i convert it to the format of ('31-AUG-2005') in vb.net?
thanks
Re: Running procedures in vb.net
using the date object and .Parse (which is on most of vb.net types to convert strings to proper types)
VB Code:
Dim dd as new Date
dd.Parse("31-8-2005")
that should work.
then you can manipulate it like a date (subtract days, extract weeks, leap years etc)
Re: Running procedures in vb.net
VB Code:
Dim myDate As Date = Date.Parse("31-8-2005")
MsgBox(Format(myDate, "dd-MMM-yyyy"))