Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Comparison between Date and Datetime type of data

I have a question that if I comapre a date to a datetime type, what actually is compared?

For example, I'm trying to sum up all values that in last 7 whole days(00:00 a.m. of the fisrt day to 24:00 p.m. of the 7th day).

I applied the filter "Table[DATETIME].[Date] >= TODAY() - 7", but the results seems not right.

Is this filter checks the date and time from the noon of the first day till the noon of the last day? Or it is only checked the date?

 

Thanks.

  • Hi Anonymous ,

     

    The filter "Table[DATETIME].[Date] >= TODAY() - 7" only check the date. If you need to check date and time meantime, you may set the data type of Table[DATETIME] as "Date/Time" .

     

    Best Regards,

    Amy 

     

    Community Support Team _ Amy

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Anonymous , seem fine, better you create a date column and use that

     

    new date = Table[DATETIME].Date

     

  • v-xicai's avatar
    v-xicai
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    The filter "Table[DATETIME].[Date] >= TODAY() - 7" only check the date. If you need to check date and time meantime, you may set the data type of Table[DATETIME] as "Date/Time" .

     

    Best Regards,

    Amy 

     

    Community Support Team _ Amy

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.