How to convert dd/mm/yy to dd/mm/yyyy?

Sreemike

Registered User.
Local time
Today, 07:07
Joined
Jan 20, 2012
Messages
54
I have a form field asking to imput a date. At the moment I am forcing the user to input date as dd/mm/yyyy via inputmask. But is there a code I can use so that even if the user type in dd/mm/yy in the box, on update it will convert this to dd/mm/yyyy format?
 
Sreemike, set the Format property of the textbox to dd/mm/yy and leave your Input Mask as it is. You don't need to do anything else, the date will be saved in the dd/mm/yyyy format in your table.
 
Using either of the Date Formats given in your post can be problematical at times; Allen Browne, another Citizen of the Commonwealth, does an excellent job of demystifying their use here:

http://www.allenbrowne.com/ser-36.html

Linq ;0)>
 
Thanks guys. We have a database system in our hospital called Telepath that enables you to enter date as ddmmyy without the / (eg: 310112) and it will convert these to 31/01/2012 on loosing focus. Is there way of doing this in Access 2010? I know it's a bit petty, but I think will help the user whe he/she has to enter many dates.
 

Users who are viewing this thread

Back
Top Bottom