Function Issues timestamp_day_of_week

Options
Hi all, 

I am trying to make use the timestamp_day_of_week function on a timestamp parameter in order to check the current day is a certain day. For example now (timestamp) timestamp_day_of_week = 3. This is how my original argument is structured:
[Screen Shot 2022-06-29 at 1.46.21 pm.png]In a basic setting (Using Now) it returns an error message:
message: Unable to locate func entry: epochms_dow
[Screen Shot 2022-06-29 at 1.36.48 pm.png][Screen Shot 2022-06-29 at 1.35.51 pm.png]
When testing I found this argument only works upon using a fixed database date.[Screen Shot 2022-06-29 at 1.35.26 pm.png]Which returns:[Screen Shot 2022-06-29 at 1.35.10 pm.png]I am unsure to why I am unable to use the current time as they are both of type Timestamp. Am I doing something wrong or is there an issue in the function itself?

Thanks in advance.

Comments

  • Chad Lewis
    Chad Lewis Member
    Options
    Anyone on this I’d like to know the same!
  • Michael Cafra
    Options
    Hi ,
    Are you able to assist? Is this an error on my end or is this a Xano bug?
    Thanks in advance. 
  • Sean Montgomery
    Sean Montgomery Administrator

    ADMIN

    Options
     looks like a bug where the function stack filters are getting mixed with the database filters.

    You can get around this by creating a variable before this statement and set it to the value now and then use the format_timestamp filter with the format w.

    Then use that variable in your query.
  • Michael Cafra
    Options
     Thank you Sean for the work around! 
    [Screen Shot 2022-07-08 at 9.16.59 am.png][Screen Shot 2022-07-08 at 9.17.07 am.png]