Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

System Date Format

Featured Replies

Hi All,

Is there a way to test (see) what the system

date format is??

(yyyy/mm/dd, dd/MM/yyyy or even in french: aaaa/MM/jj etc.)

I was able to test for language, but the user could still have a

different set-up for dates.

Also if i want to add 6 days to a date, will the system format affect how

my calculation is done?? (date + 6)--> or will this give me 6 months

or 6 years later depending on the system date??!!

Thanks

--Dan

I would use Date( Month( date ), Day( date ), Year( date ) ) since it will work in whatever date format the system is set. So, date + 6 => Date( Month( date ), Day( date ) + 6, Year( date ) ), which will return, for example, 1/5/2004, if date is 12/30/2003, in the format specified by the system.

  • Author

Thanks I will try that!!

--Dan

  • Author

What am i doing wrong??

g_DateToPass is a text field.

I want to be able (as mentionned in above posts)

to pass a proper date no matter what the system format is.

The problem i face is that this only works if a date is 5/5/2003 (May 5th)

If i try with 5/27/2003 (May 27th) i get a ? in my date field,

along with error message that says date should be dd/mm/yyyy.

Date( Month( TextToDate( g_DateToPass )),

Day( TextToDate( g_DateToPass )),

Year( TextToDate( g_DateToPass )))

I thought the [color:"blue"] Date(Month, Day, Year) [color:"black"] function would use whatever system

settings at the time of the db creation (ie: dd/mm/yyyy)

Thanks for the help.

--Dan

Have you set your field width so you can see xX/XX/XXXX in your date field?

I don't believe Date() will specify dd/mm/yyyy, but it will specify d/m/yyyy. The format you display in which you display it is up to you, based on your field formatting. To force two digits for the month and day, you'll need a case( Day( TextToDate( g_DateToPass )) < 10, "0" ) & Day(TextToDate( g_DateToPass )), etc.

Have you tried making another field that is TextToDate( g_DateToPass ) and using that as the parameter for the Date() function, instead of the TTDs?

  • Author

I'm confused.....!!!!

I started from scratch to test a couple of things....

new Db file, date field ==> testDate. Using FM 5.5v2 on windows 98 machine!

With Regional settings, date set to dd/MM/yyyy.

I create a new record enter my date in the proper format---all is good.

I go back to regional settings, date set to ==> MM/dd/yyyy.

Delete all records in db file, Close my db file.

Re-open create new record, enter date in MM/dd/yyyy format to match

regional settings.

Guess what i get an error message that says my date should be dd/MM/yyyy.

Where am i forgetting to change/reset a preference!!!???

If i can't control a simple thing like that , no wonder the rest of my Date()

function does not work!!

Help!

--Dan

  • Author

Forgot to mention that in the layout

i have date field set to leave date as entered.

  • Author

Did more testing....

With the script step "Use system formats"

I was able to solve my earlier "I'm confused post"

But i noticed the following, the step "TextToDate" only seems to be able

to translate to a valid date if the data is in the original date format

from when the file was created. In reading the help file for system date/default date format. It sounds like the Use system format only displays

& lets data be entered in a familiar format but does not change the actual

"saved" format. So if my date go from dd/mm/yyyy (original format to

mm/dd/yyyy (modified & accepted with the use of "use system format")

The TextToDate function can't convert to a recognised date.

--Dan

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.