date format in the text box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I want to formt a textbox (txtDate) in "dd.mm-yyyy" and set a default value
as Now().
Everything seems to be working apart of storing a defualt value as. When I
click the txtDate the format changes and shows me date in a long format
16/01/06 2:01:47 PM
but I would like to see it just as (in the edit mode)
16/01/06

I guess I should apply some date/text function on fce Now(), but I do not
know which one

thansk in advance
 
Supicek,
Try using Date() as the default for txtDate instead of Now().
Now() produces Date and Time... Date() produces just the Date
 
Yes, when you click in the textbox, you'll see the entire value you've
entered, not just the part the format will let you see. Now() is date AND
time. If you want just the date, use the Date() function. Storing the time
also when you don't intend to can have undesired consequences if you don't
compensate for it. For example, if you try to see if one date is before
another date and they are both the same date, but the time component is
different, you'll get a response that one is less than the other instead of
them being equal.
 
Set the default to date() insead of now(), now includes the current time,
when Date() will return the current date only, nd that what you want.
 
thanks works perfectly now.
:)

Ofer said:
Set the default to date() insead of now(), now includes the current time,
when Date() will return the current date only, nd that what you want.
 
Back
Top