Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Find EXACT date


DataChris
 Share

Recommended Posts

Hey Guys,

 

I have a startup script that searches for birthdays.

 

Basically it enters find mode and inserts.... Month(Get(CurrentDate))&"/"&Day(Get(CurrentDate))

 

Problem 10/1 (today) finds the employee with 10/19 (etc).

 

So I changed it to "="&Month(Get(CurrentDate))&"/"&Day(Get(CurrentDate))

 

But that doesn't find anything. Well it works if i enter it manually during a find but not during the script.

 

So I'm looking for the fix to find a date field that matches today.

Link to comment
Share on other sites

If you have the year of birth in your birthday field e.g. 12/10/1973 AND it is a date field then :

 

Enter Find Mode[]

Set Field [; Month ( Get(CurrentDate) ) & "/" & Day ( Get(CurrentDate) ) & "/*"]

Perform Find

 

If you don't know the year of birth then you could set the year to '0001' (or anything up to 4000) as an auto-enter on record creation and the find calc will still work.

 

If your date is in a text field and it sounds like it is (I don't think you can have a date field value with no year in it) formatted like "12/10", to make it easier you could enter your single digit dates with leading zeroes in your text field. Then something like:

 

Set Field[ ; GetAsText ( Let ( [ m = Month(Get(CurrentDate)); d = Day(Get(CurrentDate)) ] ; If ( m

 

 

…will work.

I think your problem may lie more in the method & format that you are using to store the dates. Meantime this should work with what appears to be your current format:

 

Set Field[ ; "==" & GetAsText (Month(Get(CurrentDate)) & "/" & Day(Get(CurrentDate))) ]

Link to comment
Share on other sites

Hey Guys,

 

I have a startup script that searches for birthdays.

 

Basically it enters find mode and inserts.... Month(Get(CurrentDate))&"/"&Day(Get(CurrentDate))

 

Problem 10/1 (today) finds the employee with 10/19 (etc).

 

 

It does??????????????

 

Are you SURE this date of birth field is a genuine DATE field and not a text field?

Link to comment
Share on other sites

Actually it does work with the "=...." but the trick was to search in a Month/Day field (a calc text field that eliminates the year). I had forgot I even created that for use in the script and when I was error trappin the thing I kept searching the ACTUAL date (m/d/y) field with the "=..." which was screwing the whole thing up.

 

=Equal was necessary to eliminate the 10/1 day from finding the 10/19's etc.

 

Thanks for the input!

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use