cancel
Showing results for 
Search instead for 
Did you mean: 

How to record select on datetime field?

Former Member
0 Kudos
729

HI I want to record select on datetime fields. how to do this ?

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member205840
Active Contributor
0 Kudos

Hi Paul,

There are 3 ways of doing this :

1. Parameter driven, create datetime parameter and filter based on parameter value

{?parameter}>={datefield}

2. Date Manipulation; comparing database field with manipulated date

{datefield} in lastfullweek  or {datefield}> Currentdatetime -5

3. Hard coded values, comparing against a static date

{datefield} = datetime(2016,06,01 00:00:00)

Thanks,

Sastry

Former Member
0 Kudos

Hello Paul,

We would require more information on this how you wish to do it.

Some points that you need to make sure while comparing DateTime is that you need to make sure that both the fields are of DateTime data type if one is of Date then you may need to convert it to DateTime by using DateTime() function.

Another one is to make the "Exceptions for Null" to "Default Values for Null" in the Formula editor so as to handle null values for Dates.

Regards

Niraj

former_member198519
Active Contributor
0 Kudos

Try this:

Create data range parameters like this.

1.Create a parameter named Fromdate and select your datetime field.

2.Create 2nd parameter Todate and select your datetime field.

3. Go to record selection formula write like this.

{Date} in {?Fromdate} to {?ToDate}

abhilash_kumar
Active Contributor
0 Kudos

Hi Paul,

Could you provide more details on how wish to filter records based on datetime?

-Abhilash