Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two Digits "dd/mm/yyyy" Format() not work 1

Status
Not open for further replies.

CharlesFS

Technical User
Dec 14, 2008
39
BR
Hi friends, i have this:

Code:
Sub vai()
Dim dinicial As Date, dfinal As Date, data As Date
Dim hinicial, strhinicial

[b]dinicial = DateValue(Form_Atualiza.[date1]) 
dfinal = DateValue(Form_Atualiza.[date2])[/b]

hinicial = Form_Atualiza.[hora]
strhinicial = Format(hinicial, "hh:mm")

data = dinicial

For data = dinicial To dfinal 
'Continues

I imput values like "01/01/1997" in the text fields but
the strings dinicial and dfinal get values like "1/1/1997" from the textbox.(dd/mm/yyyy)

I need this because i use the string "data" to complete an post method request string with this format "01/01/1997"

I've tryed use Format() function but i can`t make it work properly.

Thanks guys.

 
A starting point:
strData = Format(data, "dd/mm/yyyy")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top