Urgent Help with Date and then email in ASP

Hii,
USING ASP AND ACCESS
I am implementing a classified section for my website and I
am displaying
everything successfully.
When the user posts the classified he selects how many days
he wants his
POST like 10 days, 20 days or 30 days and i can successfully
show the posts
So if the user posts on says 1st of July 2006 and selects 10
days for his
post to be showed on my website
THEN
8th July 2006 an email shud go to him saying if he wants to
keep his POST
for another 10 days, 20 days or 30 days with 3 links
and IF YES the 1st july 2006 date must be changed to
Date of Post + Number of days selected initially + Number of
days selected.
I am using two columsn in the DB for this date thing one is
the strPostDate
and strAddDate
So basically the number of days selected for the post to be
shown on the
website keeps adding up each time the user clicks on the link
for 10 days,
20 days or 30 days with 3 links
please help need it badly :-)

I have to disagree with my colleages above - this isn't that
hard at all. I have done it a number of times successfully. It does
depend on a "trick", but who cares as long as it works.
Basically, the "trick" says that your site will receive a
visit once in a while! It better, or why have the site!
In ASP, use the global.asa file. In the "Session start"
section of global.asa, which is fired off every time a new comer
arrives, you have an opportunity to:
1. check if it's ok to check who needs an email (in other
words, you don't want to be checking EVERY time someone comines on
board every last listing on your site. So what i would do is allow
it to do the full check once daily, say after midnight.
2. If its ok to check who needs an email, do so, and send the
emails out.
3. After sending out emails, fix it so you will not be
resending uptil teh next time window. You could also set "flags"
for any lister where you sent an email 1st round email has been
sent.
The above is one way.
Sometimes i do the very same thing, but i simply tie the
checking routine into the home page.
Both schemes work as long as you have a single visitor once
in a while. if you never had a visitor to teh site, not even one,
then the emails would never be sent. But as i said if you go days
without a visit, better start looking for a new vocation!
www.brunswickdowntown.com is a site i did that has a
sign-up-to-stay informed email system, its been running for a year
just fine, all automatically, using the method of #1 (but for
asp.net, same difference!)
Rick

Similar Messages

  • Need Urgent Help with Apache and PHP

    I have been struggling with apache and php for a week now and I finally broke down to post a message.
    I have apache 1.3 running on my mac mini g4 with 10.4.9 and I installed sql. I went to the entropy website and downloaded php5 to install without knowing I already had php4 on the machine. I installed 5 but could not get it to work. I then went back to httpd.conf and tried to install php4 by uncommenting out the loadmodule and addmodule lines. I restarted apache but php still did not work. I tested the phpinfo.php script but all I got was the script in Safari and not the actual page. At the moment, I have php4 and php5 on my machine but can't get either one to work. I am sure there is an easy fix but I don't know it. Please help.

    The problem is not terribly complicated, but Apache will not start with the entropy file in the folder
    /etc/httpd/users/
    Let me experiment on you. Rename the entropy file and then try to start Apache. To do this, open Terminal and paste this command:
    <pre>sudo mv /etc/httpd/users/+entropy.conf /etc/httpd/users/+entropy<pre>
    Now check the Apache configuration:
    <pre>apachectl configtest<pre>
    If it says "Syntax OK", start Apache:
    <pre>sudo apachectl start<pre>
    Since we only disabled the entropy file, you should be able to enable PHP5 with some more advanced configuring.

  • Need urgent help with service and file removal

    Hi,
    I need a powershell script that would stop a windows service ,wait for 2 mins, delete a particular file from C:\documents&settings and then start the service again.Is this possible ?
    Thanks

    Thanks for the reply chen. May be i was not clear in my query
    I plan this because a particular file of configmgr is corrupt on workstations. So the service has to be stopped first before the deletion. I need to run this on many computers remotely. The import file will have the machines that need the script to be run.
    The script has to run all the four steps on the machines based on the import file and export to a file with the results.How can i modify ?
    The sequence will be as follows
    Stop-Service -Name BITS -Verbose
    Start-Sleep -Seconds 120
    Remove-Item -Path C:\documents&settings\***** -Force -Verbose
    Start-Service -Name BITS -Verbose
    Regards
    Sd

  • Need help with date and time calculations please

    Hello there.. Im stuck, and im hoping someone can help..
    Working on a list to manage and track PTO.  User completes PTO request form,
    Fields
    Name
    Start Date (with time)
    End Date (with time)
    Total Number of Days/hours requested: (calculation)
    Full Day: (Yes/No)
    ok business need
    user has the ability to request a certain number of hours as opposed to a full day.
    After searching around on google. I found this calculation to help me figure out how many BUSINESS days being requested.
    =IF(ISERROR(DATEDIF([Start Date],[End Date],"d")),"",(DATEDIF([Start Date],[End Date],"d"))+1-INT(DATEDIF([Start Date],[End Date],"d")/7)*2-IF((WEEKDAY([End Date])-WEEKDAY([Start Date]))<0,2,0)-IF(OR(AND(WEEKDAY([End
    Date])=7,WEEKDAY([Start Date])=7),AND(WEEKDAY([End Date])=1,WEEKDAY([Start Date])=1)),1,0)-IF(AND(WEEKDAY([Start Date])=1,(WEEKDAY([End Date])-WEEKDAY([Start Date]))>0),1,0)-IF(AND(NOT(WEEKDAY([Start Date])=7),WEEKDAY([End Date])=7),1,0))
    This works great as long as its a [Full Day]="YES", displays results in column labeled Number of days
    now if [Full Day]="No", displays results in column labeled Number of Hours
    BUT this is my issue (well part of it) it calcuate the correct number of hours.. but puts a "1" in "Number of Days" why.. dates have not changed.. I think Its something with the above calculation but I could be way off.
    the end result is I need number of days to concat with number of hours 
    i.e 1 full day 4 hours  1.4
        0 full day 5 hours  0.5
        1 full day 0 hours  1.0
    so that the total can be deducted via workflow.. from the remaining balance in a tracker. (seperate list) 
    Any angels out there??

    Posnera-
    Try changing time zones and see if the travel itinerary times change.
    Fred

  • Saving interactive forms with data AND then performing further edits

    I need to produce a series of interactive PDF application forms which are long and quite complicated.
    This being the case, is it possible to save the file in it's partially completed state and close it down then at another time re-open and continue to fill out the remainder of the form? I have extended features in Acrobat 9 to allow the user to fill out the form and save their changes, but when the people helping me test this re-open the form to continue, they get the message:
    "This document contained certain rights to enable special features in Adobe Reader. The document has been changed since it was created and these rights are no longer valid. Please contact the author for the original version of this document."
    The form is now locked and flattened with no live form fields on it.
    To complicate matters, it doesn't work on the PCs in my office but I can do further editing after a save on my own computer - could that be something to do with Acrobat versions or is it maybe because I am the auther of the form?
    Thanks for any advice you can give me.
    Dan Mason

    Hey guys,
    thanks for your fast reply!
    @ Chintan:
    I searched all through the wikis, blogs, forums etc. and I really couldn't find any example for the issues I tried to describe (maybe that is a problem?). If you have already read some threads about this theme, could you please point me to one? That would be really great!
    @ Otto:
    Maybe that could work, but I would like to leave out all the function module stuff. I'm dreaming of a direct connection between MII and the ADS. As I understood, the ADS and the PDFObject (wherever it comes from) are communicating via Webservice, that is not directly usable by other frameworks. I think that's the main problem?! So it's only possible to build a PDF object in ABAP or WebDynpro Java, that automatically communicates with the ADS and it's only initiatable via remote function call?!
    Thanks and regards
    Anika

  • URGENT HELP WITH DATES

    Hi, I need to compare two dates, so I can get the difference betweem them in hours.

    Try this.. This does it in days but I think you will get the idea..
    import java.io.*;
    import java.util.*;
    import java.text.*;
    public class Ex1805
         public static void main(String[] args)
              SimpleDateFormat sdf = new SimpleDateFormat("d/M/y");
              BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
              String inputDate;
              Date first = new Date(), second = new Date();
              final long MSInDay = 1000 * 60 * 60 * 24;
              boolean valid;
    // input first date
              valid = false;
              while(!valid)
                   try
                   System.out.print("Enter first date: ");
                   inputDate = br.readLine();
                   first = sdf.parse(inputDate);
                   valid = true;
                   catch(ParseException e)
                        System.out.println("Invalid     date. Please enter again.");
                   catch(IOException e)
                        System.out.println("IO Error");
    // input second date
              valid = false;
              while(!valid)
                   try
                   System.out.print("Enter second date: ");
                   inputDate = br.readLine();
                   second = sdf.parse(inputDate);
                   valid = true;
                   catch(ParseException e)
                        System.out.println("Invalid     date. Please enter again.");
                   catch(IOException e)
                        System.out.println("IO Error");
    //     calculate difference in days
              long milliseconds = second.getTime() - first.getTime();
              double doubleDays = (double)milliseconds / MSInDay;
              int days = (int)(doubleDays + 0.5);
              System.out.println("Number of days: " + days);

  • Help with writing and retrieving data from a table field with type "LCHR"

    Hi Experts,
    I need help with writing and reading data from a database table field which has a type of "LCHR". I have given an example of the original code but don't know what to change it to in order to fix it and still read in the original data that's stored in the LCHR field.
    Basically we have two Function modules, one that saves list data to a database table and one that reads in this data. Both Function modules have an identicle table which has an array of fields from type INT4, CHAR, and type P. The INT4 field is the first one.
    Incidentally this worked in the 4.7 non-unicode system but is now dumping in the new ECC6 Unicode system.
    Thanks in advance,
    C
    SAVING THE LIST DATA TO DB
    DATA: L_WA(800).
    LOOP AT T_TAB into L_WA.
    ZDBTAB-DATALEN = STRLEN( L_WA ).
    MOVE: L_WA to ZDBTAB-RAWDATA.
    ZDBTAB-LINENUM = SY-TABIX.
    INSERT ZDBTAB.
    READING THE DATA FROM DB
    DATA: BEGIN OF T_DATA,
                 SEQNR type ZDBTAB-LINENUM,
                 DATA type ZDBTAB-RAWDATA,
               END OF T_TAB.
    Select the data.
    SELECT linenum rawdata from ZDBTAB into table T_DATA
         WHERE repid = w_repname
         AND rundate = w_rundate
         ORDER BY linenum.
    Populate calling Internal Table.
    LOOP AT T-DATA.
    APPEND T_DATA to T_TAB.
    ENDLOOP.

    Hi Anuj,
    The unicode flag is active.
    When I run our report and then to try and save the list data a dump is happening at the following point
    LOOP AT T_TAB into L_WA.
    As I say, T_TAB consists of different fields and field types whereas L_WA is CHAR 800. The dump mentions UC_OBJECTS_NOT_CONVERTIBLE
    When I try to load a saved list the dump is happening at the following point
    APPEND T_DATA-RAWDATA to T_TAB.
    T_DATA-RAWDATA is type LCHR and T_TAB consists of different fields and field types.
    In both examples the dumps mention UC_OBJECTS_NOT_CONVERTIBLE
    Regards
    C

  • How to forward sms messages via email with date and contact received info

    Does anyone know how to forward sms messages via email with date and contact received info.
    Currently when I forward only the body copy of the sms message is sent in the email.

    This is not currently possible. Sorry.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Why I can't change on the settings ,I cloud ,advanced l, mail and then email address there I can't change ? Help please

    Why I can't change on the settings ,I cloud ,advanced l, mail and then email address there I can't change ? Help please?

    You can't change that address by design, but Apple allows you to create another two addresses and use instead they call those aliases and you can create and use those different for different people with the same account. Instructions here
    http://support.apple.com/kb/ph2622

  • Help on export sybase iq tables with data and import in another database ?

    Help on export Sybase iq 16 tables with data and import into another database ?

    Hi Nilesh,
    If you have table/index create commands (DDLs), you can create them in Developper and import data using one of methods below
    Extract/ Load table
    Insert location method : require IQ servers to be entered in interfaces file
    Backup/Restore : copy entire database content
    If you have not the DDLs, you can generate them using IQ cockpit or SCC.
    http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01773.1604/doc/html/san1288042631955.html
    http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01840.1604/doc/html/san1281564927196.html
    Regards,
    Tayeb.

  • Hi, i had backed up my data and then when i restored my phone with the restore backup option, all the photos, music where there but no apps. Al my apps are disappeared. Can you please tell me where are my apps backed up?

    Hi, i had backed up my data and then when i restored my phone with the restore backup option, all the photos, music where there but no apps. Al my apps are disappeared. Can you please tell me where are my apps backed up?

    Apps (like other synced media like music) are not included in the backup that iTunes makes. Thus, restoring from backup if the apps are not in the iTunes library there are no apps to restore to the iPod.
    Redownload the apps into your iTunes library.
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    And then restore from backup.
    Make sure that in iTunes>Preferences>Devices the box that say "Prevent iPods..." is checked otherwise when you connect the iPod to the computer the previous backup (with your app data) might be overwritten.

  • Is there a Java utility class to help with data management in a desktop UI?

    Is there a Java utility class to help with data management in a desktop UI?
    I am writing a UI to configure a network device that will be connected to the serial port of the computer while it is being configured. There is no web server or database for my application. The UI has a large number of fields (50+) spread across 16 tabs. I will write the UI in Java FX. It should run inside the browser when launched, and issue commands to the network device through the serial port. A UI has several input fields spread across tabs and one single Submit button. If a field is edited, and the submit button clicked, it issues a command and sends the new datum to the device, retrieves current value and any errors. so if input field has bad data, it is indicated for example, the field has a red border.
    Is there a standard design pattern or Java utility class to accomplish the frequently encountered, 'generic' parts of this scenario? lazy loading, submitting only what fields changed, displaying what fields have errors etc. (I dont want to reinvent the wheel if it is already there). Otherwise I can write such a class and share it back here if it is useful.
    someone recommended JGoodies Bindings for Swing - will this work well and in FX?

    Many thanks for the reply.
    In the servlet create an Arraylist and in th efor
    loop put the insances of the csqabean in this
    ArrayList. Exit the for loop and then add the
    ArrayList as an attribute to the session.I am making the use of Vector and did the same thing as u mentioned.I am using scriplets...
    >
    In the jsp retrieve the array list from the session
    and in a for loop step through the ArrayList
    retrieving each CourseSectionQABean and displaying.
    You can do this in a scriptlet but should also check
    out the jstl tags.I am able to remove this problem.Thanks again for the suggestion.
    AS

  • Need Help with Dates

    I am printing a calendar and certain events will be helds on certain dates.
    One can edit the event if it has not passed the date. Events in the past can be viewed but not edited.
    When I query the database the date must be formatted dd-MMM-yy
    I am able to get today's date by doing this:
    java.util.Date today = new java.util.Date();
    String formatString = "dd-MMM-yy";
    SimpleDateFormat sdf = new SimpleDateFormat(formatString);
    String today_str = sdf.format(today);
    My code for printing the calendar: I left out some of the table formatting in the JSP page.
    GregorianCalendar d = new GregorianCalendar();
    int today = d.get(Calendar.DAY_OF_MONTH);
    int month = d.get(Calendar.MONTH);
    d.set(Calendar.DAY_OF_MONTH,1);
    int weekday = d.get(Calendar.DAY_OF_WEEK);
    for(int i = Calendar.SUNDAY; i < weekday; i++)
    out.print("<td> </td>");
    do {
    int day = d.get(Calendar.DAY_OF_MONTH);
    out.print("<td>" + day + "</td>");
    String formatString = "dd-MMM-yy";
    SimpleDateFormat sdf = new SimpleDateFormat(formatString);
    //if(event exists on this day
    // Get results
    // print link for viewing
    // if (after today) print link for edit
    if(weekday == Calendar.SATURDAY)
    out.println("</tr><tr valign=top>");
    d.add(Calendar.DAY_OF_MONTH,1);
    weekday = d.get(Calendar.DAY_OF_WEEK);
    } while(d.get(Calendar.MONTH) == month);
    if(weekday != Calendar.SUNDAY)
    System.out.println();
    The part I need help on is this:
    //if(event exists on this day
    // Get results
    // print link for viewing
    // if (after today) print link for edit
    I'm looping through each day of the month to print the days. I have the month, day, year as integers. How can I create a date object out of that and compare it to today's date to test if it's before or after today???
    All the function in the Date class that I think would do this have been deprecated.

    Need Help with Dates
    Here is some information about dates:
    There are many edible palm fruits, and one of the most widespread and favored of these is the data (Phoenix dactylifera). Dates were cultivated in ancient land from Mesopotamia to prehistoric Egypt, possibly as early as 6000 B.C. Then--as now--dates were a staple for the natives of those dry regions. Much later, Arabs spread dates around northern Africa, and dates were introduced into California by the Spaniards in 1765, around Mission San Ignacio.
    The date prefers dry, hot climates, because date fruits are injured at temperatures of 20 degrees F, and the damp climate of the California coast was not favorable for fruit production. In the mid-1800s, the date industry developed in California's hot interior valleys and in Arizona. Now the date industry in the United States is localized mostly in the Coachella Valley, where the sandy soils permit the plants to be deeply irrigated. Today the new varieties, mostly introduced in this century, produce about 40 million pounds of dates per annum, or over 60% of the dates consumed in this country. The rest are imported mainly from Persia. According to one survey, about one million people are engaged entirely in date palm cultivation worldwide.
    Hope that helps.

  • Help with date validation on input boxes.

    I need some help with date validation on input boxes.
    What I�m trying to create is a form where a user inputs dates and then the rest of the form calculates the other dates for them.
    i.e. � A user inputs 2 dates (A & B) and then a 3rd date which is 11 weeks before date B is calculated automatically.
    Is this possible and if so how do I do it ???
    Thanks

    Hi,
    to get third date try this:
    java.util.Date bDate = ...;
    Calendar yourCalendar = new GregorianCalendar();
    yourCalendar.setTime(bDate);
    yourCalendar.roll(Calendar.WEEK_OF_YEAR, -11);
    java.util.Date cDate = yourCalendar.getTime();Regards
    Ldinka

  • Help with count and sum query

    Hi I am using oracle 10g. Trying to aggregate duplicate count records. I have so far:
    SELECT 'ST' LEDGER,
    CASE
    WHEN c.Category = 'E' THEN 'Headcount Exempt'
    ELSE 'Headcount Non-Exempt'
    END
    ACCOUNTS,
    CASE WHEN a.COMPANY = 'ZEE' THEN 'OH' ELSE 'NA' END MARKET,
    'MARCH_12' AS PERIOD,
    COUNT (a.empl_id) head_count
    FROM essbase.employee_pubinfo a
    LEFT OUTER JOIN MMS_DIST_COPY b
    ON a.cost_ctr = TRIM (b.bu)
    INNER JOIN MMS_GL_PAY_GROUPS c
    ON a.pay_group = c.group_code
    WHERE a.employee_status IN ('A', 'L', 'P', 'S')
    AND FISCAL_YEAR = '2012'
    AND FISCAL_MONTH = 'MARCH'
    GROUP BY a.company,
    b.district,
    a.cost_ctr,
    c.category,
    a.fiscal_month,
    a.fiscal_year;
    which gives me same rows with different head_counts. I am trying to combine the same rows as a total (one record). Do I use a subquery?

    Hi,
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    user610131 wrote:
    ... which gives me same rows with different head_counts.If they have different head_counts, then the rows are not the same.
    I am trying to combine the same rows as a total (one record). Do I use a subquery?Maybe. It's more likely that you need a different GROUP BY clause, since the GROUP BY clause determines how many rows of output there will be. I'll be able to say more after you post the sample data, results, and explanation.
    You may want both a sub-query and a different GROUP BY clause. For example:
    WITH    got_group_by_columns     AS
         SELECT  a.empl_id
         ,     CASE
                        WHEN  c.category = 'E'
                  THEN  'Headcount Exempt'
                        ELSE  'Headcount Non-Exempt'
                END          AS accounts
         ,       CASE
                        WHEN a.company = 'ZEE'
                        THEN 'OH'
                        ELSE 'NA'
                END          AS market
         FROM              essbase.employee_pubinfo a
         LEFT OUTER JOIN  mms_dist_copy             b  ON   a.cost_ctr     = TRIM (b.bu)
         INNER JOIN       mms_gl_pay_groups        c  ON   a.pay_group      = c.group_code
         WHERE     a.employee_status     IN ('A', 'L', 'P', 'S')
         AND        fiscal_year           = '2012'
         AND        fiscal_month          = 'MARCH'
    SELECT    'ST'               AS ledger
    ,       accounts
    ,       market
    ,       'MARCH_12'          AS period
    ,       COUNT (empl_id)       AS head_count
    FROM       got_group_by_columns
    GROUP BY  accounts
    ,            market
    ;But that's just a wild guess.
    You said you wanted "Help with count and sum". I see the COUNT, but what do you want with SUM? No doubt this will be clearer after you post the sample data and results.
    Edited by: Frank Kulash on Apr 4, 2012 5:31 PM

Maybe you are looking for

  • How to break a page in smartforms

    Hi all experts I want to break the page in smartforms i am using window in last cell of footer but it is giving me error message  "Page break is allowed  only in the main window" can any body tell me the solution ........ thanx in advance

  • Airplay Icon not Showing when connected to my car's bluetooth stereo

    I have an UVO system in my Kia. It has been working great with the Iphone Airplay since October. I recently updated my phone and now, just like many others, no airplay showing up on my music apps. I basically use Spotify and Pandora all the time with

  • Manually triggering updates in Office 2013

    Hi, Does anybody know how to manually trigger an update in Office 2013? How to update immediately rather than auto / scheduled? Updating via Windows/Microsoft Updates doesn't seem to work?? Many thanks.

  • Third Party Exchange Monitoring Software - PromoDag, MailScape

    We are looking at some third party solutions for better monitoring of Exchange.  Yes I know and I do a lot with powershell for reporting but after reading some reviews of these two products, I really like the idea of a centralized console to look at

  • Code compiling problem

    I have written a small sample code with 2 classes(Money.java and MoreMoney.java),where the latter has the main function. The problem is i cant compile and run these programs using commmand prompt in windows but they work just fine when using netbeans