INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: How to format a user field so that it can be used as a date in smartlists?  (Read 1289 times)

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1854

Struggling to figure this one out...

I have a user field containing date data, but I cannot figure out how to format it so that I can create a smartlist using date searching rules, eg

[my user field]<=10d   (my user field is in the last 10 days)

etc.

Tried &datatypes, tried formatdate/convertdate etc but cannot figure it out.

Anybody?

Thanks, Mark.

Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732

didn't test this, but what about

isequal([custom field], 10, 4)

if the (numeric only) custom field is less than or equal to 10, it should return the true value.  use in an if statement...?

Logged

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1854
Re: How to format a user field so that it can be used as a date in smartlists?
« Reply #2 on: February 01, 2015, 02:44:57 am »

Thanks, it's a partial solution, but I really want to be able to use proper smartlist date searches...
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: How to format a user field so that it can be used as a date in smartlists?
« Reply #3 on: February 01, 2015, 10:10:42 am »

what type of date are you trying to format?  is it user entered, or does your custom field format/convert from another date format?

with your example of <10 days, i'm assuming it's date imported, so maybe you're looking for now() to do the subtraction on and get the <10?

i've only done a little date stuff, this thread has been helpful.  in particular there is a post from MrC that has the code to create a smartlist that will show all the date modifiers...i found it helpful (and neat) as a way to understand all of the date functions...not that i do understand LOL

http://yabb.jriver.com/interact/index.php?topic=71000.msg479314#msg479314
Logged

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1854
Re: How to format a user field so that it can be used as a date in smartlists?
« Reply #4 on: February 01, 2015, 12:10:15 pm »

The field is a calculated user field.

I took a look at the thread you linked (very interesting) but am still unable to find a solution.

No matter how I format, type or convert the data is does not work with the smarlist date comparison functions.

So, my guess is that it's not currently possible to create user fields that act as date fields for use with the smartlist date functions in the same way as we can use fields such as [date imported]

Perhaps Matt or one of the other devs can clarify...




Logged
Pages: [1]   Go Up