Jump 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.

convert date from mm/dd/yyyy to yyyy-mm-dd

Featured Replies

I wan tot convert date from mm/dd/yyyy to yyyy-mm-dd .

That's not quite clear. Please provide some background: what is your starting point, and what is your purpose here.

  • Author

I m trying to find records based on date. I wan tto current date so geth this using get(currentDate)..but its in mm/dd/yyyy format and data are in

yyyy-mm-dd format

Do you mean your "dates" are stored in a TEXT field, in the form of "yyyy-mm-dd?

If so, why don't you convert them to real dates, using your file's format of m/d/y - instead of going the other way round? That way you get the full benefits of date manipulations - for example, you can search for dates in a given range.

 

 

The way you have it now, you would need to do:

Enter Find Mode []
Set Field [ YourTable::Textdate; Let ( d = Get(CurrentDate); Year ( d ) & SerialIncrement ( "-00" ; Month ( d ) ) & SerialIncrement ( "-00" ; Day ( d ) ) ) ]
Perform Find[]
  • Author

Thanks.Sorry but actually I want to find records based on timestamp means i want to find only those records which were creaated in last two hours .In this in this if I change format like this Set Variable[$date;Value:Year(Get(CurrentDate))&"-"&Month(Get(CurrentDate))&"-"&Day(Get(CurrentDate))]

This in day and months if its value are below 10 then give o/p 6 instead of "06"..

This in day and months if its value are below 10 then give o/p 6 instead of "06"..

 

Yes, I know it does. Have you tried - or even read - what I suggested?

Also check your System region, date and time format settings.

Also check your System region, date and time format settings.

 

What would this check be looking for?

I had a thought that perhaps the system date format might have been sett to mm/dd/yyyy. Yesterday a run time wouldn't accept the way I was inputting a date. Upon checking my system settings I found they had changed. Reading this thread back this is likely not related to th op's problem.

Create an account or sign in to comment

Important Information

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

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.