priyanka pawar
10th June 2012, 10:55
I want to have filtration for year only, but in my table whole date is saved so i need to get year from that date.Which function should is used to get year...???
Kindly provide solution to it.

bdittmar
10th June 2012, 14:13
I want to have filtration for year only, but in my table whole date is saved so i need to get year from that date.Which function should is used to get year...???
Kindly provide solution to it.

Hello,

use sprintf$()
Search the forum, this has been discussed several times.

For example a given UTC-Date field (Table tswcs200) :


function prepare.date.data()
{
year = val(sprintf$("%u(%04Y)",tswcs200.aftm))
week = val(sprintf$("%u(%02W)",tswcs200.aftm))
month = val(sprintf$("%u(%02m)",tswcs200.aftm))
}



Regards