Content Selection Framework - How do I get today's date in condition for Target Expression

This is Interesting: Free IT Magazines  
Home > Archive > Content Selection Framework > February 2004 > How do I get today's date in condition for Target Expression





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How do I get today's date in condition for Target Expression
Tim Gifford

2004-02-07, 9:39 am

I'm trying to setup a target express for a discount. This discount only
displays if a user is a current member based on the members account
expiration date.

I have a date field in the user profile named, "AccountExpiration" and I
want to compare that field to today's date.

I'm able to create an expression like:
UserProfile.AccountExpiration < 1/1/2004

I would like to create an expression like:
UserProfile.AccountExpiration < Today()

Is there any way to do this?

Thanks in advance....
-Tim


Andy Xu[MSFT]

2004-02-24, 10:37 am

Tim,

Current version of commerce server product won't allow you to set an expression value (for example, Today()) on the right hand side of the operator.

I think what you can do is to create another property in user profile, let's call it: AccountIsValid, for example. Then in your site code, before running basket pipeline, you compare user profile's AccountExpiration
filed with DateTime.Now. If account is expired, your site code can set UserProfile.AccountIsValid to false. Your discount can use target expression UserProfile.AccountIsValid = true.

HTH,
-- Andy

--------------------
From: "Tim Gifford" <tgifford@crowechizek.com.spamdidalisious.com>
Subject: How do I get today's date in condition for Target Expression
Date: Fri, 30 Jan 2004 09:31:27 -0500
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <uDeYA3z5DHA.2560@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.commerceserver.campaigns_csf
NNTP-Posting-Host: indy-fw.crowechizek.com 63.149.37.194
Path: cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGXS01.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.commerceserver.campaigns_csf:2486
X-Tomcat-NG: microsoft.public.commerceserver.campaigns_csf

I'm trying to setup a target express for a discount. This discount only
displays if a user is a current member based on the members account
expiration date.

I have a date field in the user profile named, "AccountExpiration" and I
want to compare that field to today's date.

I'm able to create an expression like:
UserProfile.AccountExpiration < 1/1/2004

I would like to create an expression like:
UserProfile.AccountExpiration < Today()

Is there any way to do this?

Thanks in advance....
-Tim


--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com