How do I get today's date in condition for Target Expression
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Content Selection Framework > How do I get today's date in condition for Target Expression




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

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


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-07-04 02:39 PM

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







[ Post a follow-up to this message ]



    RE: How do I get today's date in condition for Target Expression  
Andy Xu[MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-24-04 03:37 PM

Tim,

Current version of commerce server product won't allow you to set an express
ion 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 runnin
g basket pipeline, you compare user profile's AccountExpiration
filed with DateTime.Now. If account is expired, your site code can set UserP
rofile.AccountIsValid to false. Your discount can use target expression User
Profile.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!TK2MSF
TNGXA05.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.commerceserver.campaigns_csf:248
6
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 incl
uded 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 mess
age are best directed to the newsgroup/thread from which they originated.





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:56 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register