Mayur K
Mayur K

Reputation: 21

Pervasive Date Comparison

I am a newbie to Pervasive and I am trying to fetch all records from Patient table where the Date of birth of Patient is not '11/30/0002'

The Birthdate is stored in MM/DD/YYYY format in the system

Requesting your assistance

Upvotes: 2

Views: 1823

Answers (1)

mirtheil
mirtheil

Reputation: 9192

If the field is defined as a date, then you can use the standard format to restrict the data. For example:

select * from Patient where birthdate <> '0002-11-30'

The date format YYYY-MM-DD. If it's not in that format, you can convert it using various functions. For example:

select right('06/05/1995',4) + '-'  + substring('06/05/1995',4,2) + '-' + left('06/05/1995', 2)

Upvotes: 2

Related Questions