Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Highlighted
udaya_kumar
Valued Contributor

i need the maximum date in array in VBScript

hi,

i am using VBScript in QlikView, i have one array, which contains the list of dates, but i want to get the maximum date from the array.

so how can i get it using VBScript?

Tags (2)
1 Solution

Accepted Solutions

i need the maximum date in array in VBScript

Hi,

     Try like this

    

MaxDate = CDate(MyArray(0))

for i = 1 to MyArray.Count -1

     if CDate(MyArray(i)) > MaxDate then

          MaxDate = CDate(MyArray(i))

next

Celambarasan

4 Replies
mwoolf
Honored Contributor II

i need the maximum date in array in VBScript

Something like this?

dtmMaxDate = 0

for i = 0 to MyArray.Count -1

     if MyArray(i)> dtmMaxDate then dtmMaxDate = MyArray(i)

next

msgbox dtmMaxDate

i need the maximum date in array in VBScript

Hi,

     How you store the dates in array?

Celambarasan

i need the maximum date in array in VBScript

Hi,

     Try like this

    

MaxDate = CDate(MyArray(0))

for i = 1 to MyArray.Count -1

     if CDate(MyArray(i)) > MaxDate then

          MaxDate = CDate(MyArray(i))

next

Celambarasan

udaya_kumar
Valued Contributor

i need the maximum date in array in VBScript

Thanks for reply Celambarasan