redrocks007
24th June 2009, 15:01
Hi Guys,

I have filter fields like from date and to date. if suppose i am giving from date as 06/06/2009. i want to get track the date as 01/06/2009.so that i can calculate delivered qty from staring day of the month of from date to to date .

can any one help me.

i am able get it it as 01/06/2009 as per above example.
but not able compare in the select query ,because of its in string.

my code is here.
normal.date = sprintf$("%u(%04y-%02m-%04Y)",date.f)
year = normal.date(1;4)
month = normal.date(6;7)
date = "01"
time1 = "12:00:00"
string.date = concat$("-",year,month,date)

Can any one tell me how to get it back to date format again.


Regards,
redrock.

mark_h
24th June 2009, 16:03
I do something like this in one program:

num.day = val(read.date(4;2))
num.month = val(read.date(1;2))
num.year = val(read.date(7;4))
tdudi020.date = date.to.num(num.year, num.month, num.day)