INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Change the date format to dd/mm/yyy if the regional setting of computer is at another format

Change the date format to dd/mm/yyy if the regional setting of computer is at another format

Change the date format to dd/mm/yyy if the regional setting of computer is at another format

(OP)
i had editmask field of type datetime in formatt dd/mm/yyyy
when my app is running in a machine has date format "yyyy/mm/dd" when the user tries to write 31/12/2012 or any similar date -an error message appears -as it must write 2012/12/31
how can i change the format from my app -as did from regoinal setting
I tried to use Registryset("HKEY_CURRENT_USER\Control Panel\International", "sShortDate", RegString!,'dd/MM/yy'
but no chnage occurs thanks

RE: Change the date format to dd/mm/yyy if the regional setting of computer is at another format

Hi pb,

I tried to reproduce your case but .....

To me it works fine:
Having specified 'aaaa-MM-dd' in windows control panel, windows 7, latest patches/EBF's installed, PB 11.5, I can't get any error at all. It works fine for me, having a dw with a column of type DATE with EditMask 'dd/mm/yyyy'.

Anyway, first of all, what you might not want to hear:
----------------------------------------------------
I think your application should respect the user specified settings of date in his windows, rather than forcing him to use a format he doesn't seem to want, regarding his windows settings for date formats.

To do so, your application should read the date format from windows and apply it dynamically to your date-masks.

regards,
Miguel L.

RE: Change the date format to dd/mm/yyy if the regional setting of computer is at another format

forgot to say, running Spanish windows 7 (that's why 'aaaa' instead of 'yyyy' in windows control panel)

regards,
Miguel L.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close