QUOTE(KeyWiz @ 27 Aug, 2008 - 08:08 PM)

QUOTE(vivekrane1986 @ 25 Aug, 2008 - 09:46 PM)

Hi guys
I am developing a software where I place controls and Set their properties at runtime by reading a file. I also mentioned what Get properties I will use in the same File. Then I pass these values to oralce sql as parameter.
The problem I am facing is with date. I want Date in a Formatted way as MM-yyyy Which I will mention in the file it self. But How can I use Format function in CallByName to get date in this Format.
Even after setting DateControl format to MM-yyyy we get the date in Normal way only. Guys Please help me.
Thanks ,
Vivs
Formating the OUTPUT of a date does not change the way it is stored. You will need to either save your data in a TEXT form after you convert it's look or change the Formating in the Oracle output to reflect your desired mask.
Thanks Dude for reply. But the problem is I can not change the Oracle formatting.
The main problem is I am designing the form at run time from xml file.I don't know which controls will be placed on the form and what property user is referring to.
Properties and method information is stored in the xml.I just read the file. Set Parameter array using CallByName and pass the values to oracle as parameter.
CODE
strParamName(i)=ObjParam.Parameter 'This object will return parameter name
strParamValue(i)=cstr(callbyname(ctlcontrol,strProperty,vbget)) 'ctlControl is Control object that is retrived from xml file. strProperty is Property Name that also retrived from xml file.
in strParamValue(i) I want date in the form "mm-yyyy"
Is there any other control i can use instead of DTPicker.
Or I have to create my own control like dtpicker that will return Date in required format.
Thanks ,
Vivs