3

I have an SQLBase and I am trying to get the current date of the system to be equal to the date of a column (create_date).

The MySQL Code will be:

Select * From Date D
Where D.Create_date=CURDATE();

Can someone suggest me a way to take the current date in a SQLBase?

The date format should only contain the date(yyyy-MM-dd) and not the timestamp.

digital.aaron
  • 5,435
  • 2
  • 24
  • 43
  • 1
    I know this has already been answered , but if you need to know more about SQLBase, here is a link to some manuals for every version from v8 thru v12.1 : http://samples.tdcommunity.net/index.php?dir=SqlBase/SqlBase_Books/ – Steve Leighton Jul 20 '18 at 01:50

2 Answers2

3

To get the current date, and not time, you should be able to use @DATEVALUE(@NOW).

digital.aaron
  • 5,435
  • 2
  • 24
  • 43
-2

This should get you the results you want:

DECLARE @Temp TABLE (
Col1 NVARCHAR(1)
,Date  date 
)

INSERT INTO @Temp
VALUES 
('a','2017-12-08')
,('b','2017-12-08')


SELECT *
FROM @Temp
WHERE Date = CONVERT(date, getdate())