Link to home
Start Free TrialLog in
Avatar of Ozhee
OzheeFlag for United States of America

asked on

How to Identif User Date Regional Setting

Dear Experts,

I have an input form which one of the field is in date format, since all the user have different setting in their date regional setting (some user have format dd/mm/yyyy or mm/dd/yyyy or yyyy/dd/mm). this cause i can't set the default format for the date field.
is there a way to solve this problem so they not input the wrong date. let say we default the input with dd/mm/yyyy format.


Please Advise,
Ozhee

Avatar of AHMKC1
AHMKC1

Use DateTime Picker ActiveX control or Calendar control
in which user select date database store date on its own format

or you can

Add three unbound textbox (txtDD, TxtMM,txtyyyy) and write following code after update events of these three textbox

if Not Is Null(txtDD) and Not Is Null(txtMM) and Not Is Null(txtyyyy)  then
datefield=DateSrial(txtyyyy, txtMM, txtDD)   ' Where DateField is bound field to the table and its visible property set Invisible
endif
Avatar of Ozhee

ASKER

thanks for the reply,

i have tried to use date picker but it always have an error when use it in form with continuous form style.


regards,
Ozhee
use calendar control
generaly I use calendar control to entry a date(I use it at seperate form and to entry a date, textbox (where entry the date ) at dbl click event  I pen it and select the date
Avatar of Ozhee

ASKER

Ok i'll try it first...thanks
Avatar of Ozhee

ASKER

Dear AHMKC1,

I have try your method to use calendar control. it works great. but i have difficulties in setting the default value of the calendar control to automatically use the current date.

could you advise me how to set the calendar control value to automatically set to current Date...


Thanks,
Ozhee
ASKER CERTIFIED SOLUTION
Avatar of AHMKC1
AHMKC1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ozhee

ASKER

Thank that's work very well


Regards,
Ozhee