frenstonite
22nd May 2008, 05:49
Hi,
Does anybody know how to convert date to string?
I want to get the date from table and convert it to MMM/YYYY form.
Then determine the orders in that month and year.
rahul.kolhe22
22nd May 2008, 08:05
Hi,
You can use sprintf$ function do it.
If the date formate is UTC date then you can use this
now.date = sprintf$("%u(%h/%04Y)", utc.num())
If the date formate is UTC date then you can use this
now.date = sprintf$("%D(%h/%04Y)", date.num())
Here now.date is the string which will containe the date in string formate
frenstonite
22nd May 2008, 09:43
Thanks..
But I still cannot pass the date to the form field of my report.
Do u know what should I do?
mark_h
22nd May 2008, 17:29
Here are some things to check - first make sure the report field is declared external in the session script, second make sure the field is declared the same in the report. So in this case both fields should be declared as strings. Then make sure the field is set using the sprintf$ mentioned above - before the rprt_send is issued in the script.
You might need to post your script.
frenstonite
23rd May 2008, 03:46
I have done it...
Thanks...