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.

DateSerial to searchable date

Featured Replies

I want to enter a date, add a set number of days, and produce another date. The second date must be searchable as a date. When I have tried this I have received a date serial that I have not figured how to convert back to a searchable date. I have used the date to text function and received acceptable formating, but then the date range search does not work as it is text (or the underlying serial.) Example: 4/7/00 is date A. Add seven days and get 4/14/00 in the second datefield. I can now search the second date field as a date. How do I do this.

quote:

Originally posted by jacger:

I want to enter a date, add a set number of days, and produce another date. The second date must be searchable as a date. When I have tried this I have received a date serial that I have not figured how to convert back to a searchable date. I have used the date to text function and received acceptable formating, but then the date range search does not work as it is text (or the underlying serial.) Example: 4/7/00 is date A. Add seven days and get 4/14/00 in the second datefield. I can now search the second date field as a date. How do I do this.

You could create a calculated field called 'NewDate' as follows:

NewDate = Date( Month( DateToConvert), Day( DateToConvert) + DaystoAdd, Year( DateToConvert))

Where 'DateToConvert' is the date that you want to convert and 'DaystoAdd' is the number of days you would like to add to 'Date'.

Note: You could also use the Set Field function in a script to perform the calculation at a specified time so that 'NewDate' does not need to be a calculation field.

I hope that this helps.

I think the problem is that the type of the result in you calculated date field is set to

"number" rather than "date". Calculated date fields should appear as dates and be searchable. If the calculated field is set to "number", it won't appear as a date and adding arcane calculations won't solve the problem!

-bd

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.