Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

adding current date in the table

Hello Friends,

As I have a table and I would like to insert a current date field in the table

How to add the today date in the sql select script

Set Date = Today()

SQL

SELECT

          Date,

          Customer,

    Customer_id,

    Count(Test) as NumInv,

    Sum(Test1) as TotAmt

FROM Scxxx9023;

Regards

Chriss

Labels (1)
1 Solution

Accepted Solutions
kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi,

Try This.

SQL

SELECT

          Now() as Today,

          Date,

          Customer,

    Customer_id,

    Count(Test) as NumInv,

    Sum(Test1) as TotAmt

FROM Scxxx9023;

Ex: Now() as Today

Refer Below mentioned URL:

http://www.w3schools.com/sql/sql_dates.asp

View solution in original post

2 Replies
kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi,

Try This.

SQL

SELECT

          Now() as Today,

          Date,

          Customer,

    Customer_id,

    Count(Test) as NumInv,

    Sum(Test1) as TotAmt

FROM Scxxx9023;

Ex: Now() as Today

Refer Below mentioned URL:

http://www.w3schools.com/sql/sql_dates.asp

Not applicable
Author

Hi Kumar,

Thanks for your help, it works.....

Regards

Chriss