[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[mv] Compare system date to field date
****** message to minivend-users from "Curt Hauge" <chc@mninter.net> ******
Hi list,
And thanks for the help in the past. I have been trying to compare todays
date with a date in a field in the current database. I use MV4.04 and I know
I am real close. The date format in the DB 'events' for the field 'SortDate'
is 20000722. Perhaps this cant be done the way I expect. Here is what I have
tried, without success:
(substituted various operands in many cases: ==, =~, >=, gt, ge)
example 1
[if data events::SortDate::[item-data events EventID] ge [tag
time]%Y%m%e[/tag]]hello[/if]
Please note - this works:
[if data events::SortDate::[item-data events EventID] ge 20000722]hello
world[/if]
example 2
[seti cur_date][tag time]%Y%m%e[/tag][/seti]
[if data events::SortDate::[item-data events EventID] ge /[scratch
cur_date]/i]hello world[/if]
note: [scratch cur_date] does produce 20000722
example 3
[item-data events Start_Date]</b>[if data events::SortDate::[item-data
events EventID] ge /[tag time]%Y%m%e[/tag]/i]hello world[/if]
example 4
[if type=value term=[tag time]%Y%m%e[/tag] op="ge" compare="/[value
SortDate]/"]hello world[/if]
this ALWAYS produces 'hello world' (and I dont know why)
[if type=value term=20000722 op="ge" compare="/[value SortDate]/"]hello
world[/if]
example 5
[if type=value term="events::SortDate::[tag time]%Y%m%e[/tag]" op="ge"]
hello world[/if]
example 6
[if explicit]
[condition]
$cur_date = '[value SortDate]';
return 1 if $cur_date ge [tag time]%Y%m%e[/tag];
[/condition]
hello world
[/if]
Anyone?
Thank you,
Curt Hauge
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list