Three noob questions. Please help.
1. Is there a way to have arguments on subroutine that are optional?
2. Say I need to convert datetime to string..in this format :
2006-09-07 23:00:00.000
datef.tostring()
produces:
'1/1/0001 12:00:00 AM'
I need it to produce something like this:
2006-09-07 23:00:00.000
I know you can do something like this:
..datef.ToString("MM\-dd\-yy")
3. I want to pass a subroutine an argument that might be type string or
might be type datetime.. how can I do this and then use it's value
accordingingly? type Object maybe?
as a bad example to demonstrate the problem.
say..
Public Sub UpdateJob(ByVal field as string, ByVal Value As Object)
will I be able to call UpdateJob
like this
Update(datetimef) (where datetimef is type datetime)
and like this
Update(stringf) (where stringf type string)
and then inside UpdateJob
SQL = "Update job set " + field + "='" + Value
The above of course does not work.
Thank you in advance for any help or information.