Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 132,396 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,231 people online right now. Registration is fast and FREE... Join Now!




Using Format from CallByName

 
Reply to this topicStart new topic

Using Format from CallByName

vivekrane1986
post 25 Aug, 2008 - 08:46 PM
Post #1


New D.I.C Head

*
Joined: 1 Aug, 2008
Posts: 27


My Contributions


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

User is offlineProfile CardPM

Go to the top of the page

KeyWiz
post 27 Aug, 2008 - 07:08 PM
Post #2


D.I.C Regular

Group Icon
Joined: 26 Oct, 2006
Posts: 428



Dream Kudos: 125
My Contributions


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.
User is offlineProfile CardPM

Go to the top of the page

vivekrane1986
post 28 Aug, 2008 - 10:43 PM
Post #3


New D.I.C Head

*
Joined: 1 Aug, 2008
Posts: 27


My Contributions


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
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 07:21AM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month