Q2) Actualy the date formate will be mm/dd/yyyy if we changed the formate to assaigned into date variable it will show formate error.
date variable will accept some foramate as per my knowledge.
--> If we assaigned 12/2000 formate date variable will take 12/1/2000 formate.
ex:
dim _date as date 12/2000
msgbox(_date) //output is 12/1/2000 by default it will take 1 day
--> If we assaigned 12/2000/31 fomate date variable will take 12/31/2000 formate
dim _date as date 12/2000/31
msgbox(_date) //output is 12/31/200
In Below example: we are removeing 31/ from 31/12/2000 formate and added that at lost of the word like : 12/2000/31 and finally i assaigned to date variable then as i said above that formate will be 12/31/2000 formte.
--------------
Dim _strdate_string As String 31/12/2000
_strdate_string Mid(_strdate_string _strdate_string.IndexOfAny(
/ ) + 2 _strdate_string.Length) + / + Mid(_strdate_string 1 _strdate_string.IndexOfAny( / ))Dim _strdate As Date Convert.ToDateTime(_strdate_string)MsgBox(_strdate) //out put 12/31/2000