> coba1=# select name from users where "Date" >current_date - 30;
> name
> ---------------------
> coba11
> testCoba11
>
>
> Did not help
>
> /usr/bin/psql -U postgres -d coba1 -c "select name from users where Date
> > current_date - 30;"`
>
> same error
>
It looks like you have a column named Date, capitalized. Which means you actually need to surround your column name with double quotes.
Your shell (bash?) is removing the double quotes, so either escape your double quotes:
/usr/bin/psql -U postgres -d coba1 -c "select name from users where
\"Date\" > current_date - 30;"
Or use single quotes to surround the query, which also prevents your shell from removing the double quotes.
/usr/bin/psql -U postgres -d coba1 -c 'select name from users where
"Date" > current_date - 30;'
You may also want to consider not using capitalized column names, as it would remove the need to quote column names altogether.