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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to create auto genarate date filed in qlikview

id  name

1   xy

2   rt

3   ty

4   pk

5   ry

6   io

I want to add another filed is date filed

id name todaysdate

1  xy      29-01-2016

2  rt        29-01-2016.

there is no date filed in source how to get that date filed .

10 Replies
settu_periasamy
Master III
Master III

General Autogenerate example will look like this..

Let vMinDate=Num('1/1/2016');


LOAD Date($(vMinDate)+RecNo()-1) as Date

AutoGenerate 366;  //This will create Entire Year Date

for your requirement, If you want to the today's date for all your record, try like below..


LOAD *,Today() as TodaysDate;

LOAD * INLINE [

    id, name

    1, xy

    2, rt

    3, ty

    4, pk

    5, ry

    6, io

];

sunny_talwar

What Date you want assign to each record? Is it random or is there some logic? Like may be assign each record to Today's date?

Anonymous
Not applicable
Author

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Add this field in your load:

today(1) as TodaysDate

-Rob

Not applicable
Author

little  change on question..

I have 2 date fileds like.

date                 today's

12-1-2016        5-2-2016

1-1-2016          5-2-2016

I want calculate the range of two fileds and that range count doesn't calculate the weekends dates.

example:

date                      today's                range

12-1-2016             5-2-2016              19

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Use the NetWorkdays function.

NetWorkdays(today-date)

See the Help for Networkdays().

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

MarcoWedel

please don't post the same question multiple times

I have 2 date fileds like.

thanks

regards

Marco

PradeepReddy
Specialist II
Specialist II

try something like this..

Networkdays(date, today())

Not applicable
Author

Thank you Pradeep.