Dependant Dropdown - Format string as date?? And hopefully two dates as a range?

I'm stuck - been trying to figure this out all afternoon and with a launch in 2 days am probably missing something obvious....so please help me!! hehe<br />I have the a dependent drop down.  The first one is a list of Locations and the second one is then populated by a list of dates that events will be at those locations.<br /><br />1st problem:  when I've been hand coding this drop down I am able to show the start and end date with something like:<br />echo date( 'l, M j', $row_getalldates['date_start']).' - '.date( 'M j',$row_getalldates'date_end']);<br /><br />b How do I translate that into one string to display in wdg:displayfield=""<br /><br />2nd:  Right now since I can't get the two values in...I'm just going with one value so I can continue with development till I figure it out.  <br /><br />I cannot get the date formatted as I usually do with the date() function I usually use. See: http://camp.studentlife.com/housing2/index.php?op=addinfo<br /><br />b SQL STATEMENT:<br />$query_getalllocations = "SELECT distinct(b.title),locationid FROM calendar a LEFT JOIN sllocations b USING (locationid) WHERE b.title is NOT NULL and a.date_start>$mstart_date and a.date_start<$mend_date AND (a.calid='1' ) GROUP BY b.title ORDER BY b.title ";<br />$getalllocations = mysql_query($query_getalllocations);<br />$row_getalllocations = mysql_fetch_assoc($getalllocations);<br />$totalRows_getalllocations = mysql_num_rows($getalllocations);<br /><br />$colname_getalldates = "-1";<br />if (isset($_GET['locationid'])) {<br />  $colname_getalldates = $_GET['locationid'];<br />}else{<br />     $colname_getcalendar = "-1";<br />     if (isset($_GET['eventid'])) {<br />       $colname_getcalendar = $_GET['eventid'];<br />     }<br />     <br />     $query_getcalendar = sprintf("SELECT * FROM calendar WHERE eventid = %s", GetSQLValueString($colname_getcalendar, "int"));<br />     $getcalendar = mysql_query($query_getcalendar);<br />     $row_getcalendar = mysql_fetch_assoc($getcalendar);<br />     <br />     $colname_getalldates =$row_getcalendar['locationid'];<br />     mysql_free_result($getcalendar);<br />}<br /><br />$query_getalldates = sprintf("SELECT a.* FROM calendar a WHERE locationid = %s and a.date_start>$mstart_date and a.date_start<$mend_date ORDER BY a.date_start ASC", GetSQLValueString($colname_getalldates, "int"));<br />$getalldates = mysql_query($query_getalldates);<br />$row_getalldates = mysql_fetch_assoc($getalldates);<br />$totalRows_getalldates = mysql_num_rows($getalldates);<br /><br />b ABOVE MY HEAD TAG:<br />//begin JSRecordset<br />$jsObject_rs_alldates = new WDG_JsRecordset("rs_alldates");<br />echo $jsObject_rs_alldates->getOutput();<br />//end JSRecordset<br /><br />b AND INSIDE MY FORM:<br /><select name="location" class="required" id="location" tabindex="1"><br />   <option value="0" <?php if (!(strcmp(0, $row_rs_alllocations['locationid']))) {echo "selected=\"selected\"";} ?>>SELECT LOCATION</option><br />   <?php<br />do {  <br />?><br />   <option value="<?php echo $row_rs_alllocations['locationid']?>"<?php if (!(strcmp($row_rs_alllocations['locationid'], $row_rs_alllocations['locationid']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rs_alllocations['title']?></option><br />   <?php<br />} while ($row_rs_alllocations = mysql_fetch_assoc($rs_alllocations));<br />  $rows = mysql_num_rows($rs_alllocations);<br />  if($rows > 0) {<br />      mysql_data_seek($rs_alllocations, 0);<br />       $row_rs_alllocations = mysql_fetch_assoc($rs_alllocations);<br />  }<br />?><br />    </select></span></label></p><br />  <p><label><span><br />    <select name="date" class="required" id="date" tabindex="2" wdg:subtype="DependentDropdown" wdg:type="widget" wdg:recordset="rs_alldates" wdg:displayfield="date_start" wdg:valuefield="eventid" wdg:fkey="locationid" wdg:triggerobject="location" wdg:selected="SELECT YOUR CAMP DATE" ><br />    </select></span></label></p><br />1st I though it was the wdg:selected parameter that I could just throw make echo date( instead of just echo.   But no...that would be too easy ;)<br /><br />I figure its either in the "echo $jsObject_rs_alldates->getOutput();" above the head or hard coded into the included ADDT javascript files. Don't mind if I have to hard code as the site's lifespan is short

Hi Amanda,
how about preparing that within your query by using a CONCAT function and by formatting the dates right in here, like:
SELECT CONCAT(DATE_FORMAT(date_start, '%I, %M %j')," - ",DATE_FORMAT(date_end, '%M %j')) AS date_range ?
The wdg:displayfield expects one table column, and in this case it would be the alias column "date_range".
Works ?
Cheers,
Günter Schenk
Adobe Community Expert, Dreamweaver

Similar Messages

  • Month to Date and Year to Date Scenarios

    <b>Dear SAP BI Gurus,
    Can anyone please give me guidance how to create a Month to Date and Year To Date Scenarios (Variables perhaps?) for 0SRR_CF_C1?  The date is in decimal and not DATE format…  I’m assuming the reason for this is to get the Time variance….  Nonetheless, I’d like to create a MTD and YTD scenario for reporting.
    Much Thanks
    Philips Manalaysay</b>

    Hi,
    You should take a look at the blog and doc below.
    /people/vikash.agrawal/blog/2006/10/17/enable-trend-reporting-150-by-manipulating-variable-value
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
    Regards,

  • Difference between "Database Variant To Data" and "Variant To Data"

    Can anyone tell me the differnce between the 2 VI's "Database Variant To Data" and "Variant To Data"?
    I am using the database connectivity toolset and making a query.
    I have tried using both, but the give me the same result.
    Attachments:
    Variant to Data.JPG ‏45 KB

    You won't see a difference between these two functions with just a string or other simple data types.  Where you'll see a difference is with clusters and more complex data types that come from the database.  The variants returned by databases can be slightly different than the standard variant.  That is where the Database Variant To Data is needed.  Otherwise, if you are just reading string information, either function will work fine.
    Crystal

  • Material Master Data and PO Master Data Table

    Dear SAP Gurus and Expert,
    Currently user is having a new integration system which link to SAP, and they require the migration of Material MAster Data and PO master data.
    As a result of that, what table can be accessed in SE16 in order to get all the material master data and PO master data to be exported to excel fil format.
    Thank you
    Regards

    Hi,
    For material master data
    MARA                           General Material Data
    MARC                           Plant Data for Material
    MAKT                           Material Descriptions
    MARD                           Storage Location Data for Material
    You can enter MA* in SE16 and press F4 too get all the tables according to the views.
    For Purchase order
    EKKO
    EKPO
    EKBE
    EKKN
    Search for EK* in SE16.

  • Need logic for invoice due date and discount due date uncear

    Hi Experts.. am new to ABAP
    i had an issue please need some logics for these..
    Formatting of the Invoice due dates and Discount due date is unclear e.g 20101109,
    Invoice due date and Discount due dates are in correct on 10 and 20 days  reminders on missing credit notes for blocked invoices.
    <removed by moderator>
    Thanks & Regards
    Edited by: Thomas Zloch on May 18, 2011 1:55 PM

    Can you provide more info?
    are you talking about BSID open accounts?
    if yes, use function module DETERMINE_DUE_DATE.
    <removed by moderator>
    Edited by: Thomas Zloch on May 18, 2011 2:10 PM - please do not ask for "award"

  • Fixed start date and variable end date

    I'm using Project 2010 Standard. Task A has already started. It can't end until 2 weeks after the completion of task B. The only way I can make Project schedule this task is by doing so manually, allowing Project to calculate the duration. But then if the
    end date of task B changes, Project reschedules the entire task based on the duration without regard for the start date. If I add a % complete to task A, then the end date doesn't change if the end date of task B does. Project seems to fix the duration
    once it's calculated. I need the duration to be flexible based on the fixed start date and the end date of task B. This project file is stored in SharePoint so I can't make task A a hammock task. I get the error "You cannot create links from a project
    file that exists on a Web folder to another file" even though it's the same file. Any suggestions would be greatly appreciated.

    WhoKnows,
    I'm afraid without a hammock task the only way to do what you want is either with a manual reschedule or a macro to recalculate the duration of Task A when Task B moves.
    Update: Okay, after playing around here is a little trick that might work.
    1. Break Task A into two parts (e.g. -1 and -2)
    2. Set the predecessor of Task A-2 to be finish-to-start with Task A-1 and finish-to-finish + 2w with Task B
    Depending on the nature of Task A you may still need to do a little manual adjusting but it will effectively allow the start of Task A to be fixed and the finish to be variable depending on the status of Task B. Does that work for you?
    John

  • I just got a new iPhone and i set up iCloud on my girlfriend's account. To change it on settings it says delete account. Will this delete her all her data and back up data for iCloud on her iPhone and iPad?

    I just got a new iPhone and i set up iCloud on my girlfriend's account. To change it on settings it says delete account. Will this delete her all her data and back up data for iCloud on her iPhone and iPad? Can i change it without deleting it? Please help.

    Delete the account on your phone. This will not delete any data on her phone or iPad, or data stored in iCloud.

  • PO creation Date and Invoice creation Date

    Hi,
    Can any one help me regarding which table I can look for PO creation date and Invoice creation date. I require these fields for my reporting requirement.
    Thanks in advance,
    Arvind.

    Thanks for your response Bala.
    I got the Table which I require. I have one more question on this.
    Can you tell me Invoice Creation Date is RBKP-BLDAT(Document Date in Document) or RBKP-BUDAT(Posting Date in the Document) and PO creation Date is EKKO-AEDAT(Date on which the record was created) or EKKO-BEDAT(Document Date in Document).
    Points already rewarded.

  • Planned order creation with PDS valid on only order start date and not finish date

    Hi All,
    We have requirement to allow creation of planned order manually if production version is valid on order start date and not finish date.  This is because lead time of order is longer. I refered OSS notes 385602. I could find out solution for this is implementation of OSS note 694140 to change validity mode at activity level to consider start date of first produce activity  in validity interval. Problem is even If I create order in APO by implementiong this note planned order is not transfered to ECC and it gets stuck with error production version not valid.
    Is there any way in ECC to control this? Any config or customization?
    Regards,
    Santosh

    Nilesh,
    I think there is a simple procedural skip happening in your business process. You are right when a planned order is created after MRP it would default assign it to the first available production version. 2options available for us,
    1. First use transaction MF50 and do the line loading and assign the quantites to the production versions/Production lines, so that the actual capacity planning is getting completed. This way you can have planned orders with both the production versions and matching to your actual line capacity.
    2. Use Quota arrangement concept, to automatically split the Planned orders during MRP for a percentage based on individual production versions.
    Now when backflush is performed S225 table is updated and Planned order qty also gets reduced.
    Hope this helps....
    Regards,
    Prasobh

  • Goods issue date and goods receipt date

    Hi Guys,
                 i was asked to display STO list.They asked me add goods issue date and goods Report date in the o/p columns.So any body can tell me what are the fields for goods issue and goods Receipt date's.?can u guys tell me the Tr code for these fields .?
    Thanks,
    Gopi.

    Hi there,
    I already solve it by myself.
    Actually is i call the initialization twice:
    Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenEntry)
    Thats what make this problem happened.
    Sorry.
    Best Regards,
    danny

  • Process Order Basic Finish Date and Scheduled Finish Date

    Folks,
    I have a requirement from the business to be able to update the Process Order Basic Finish Date and Scheduled Finish Date independently from each other.
    In other words, update the Basic Finish Date and the Scheduled Finish Date cannot change or update the Scheduled Finish Date and the Basic Finish Date cannot change.
    I believe the reason for this is to be able to use the Basic Date to maintain the ATP accurately and keep the Scheduled Date to mark when the order was originally due from the shop floor to be able to measure if orders are being completed on time or late.
    I have worked in tnx OPUZ and had some success with other issues with these dates but I can't seem to make them work independently from each other.
    Or does anyone have any ideas how to measure proces order performance to the production schedule?
    Thank you for your help,
    Greg

    Rajesha, thank you for your reply but it doesn't solve my problem.
    Let me restate my scenario:
    I start a process order and both the basic and scheduled finish dates are the same, June 1.
    At some point, shop floor tells me they will be late and cannot deliver until June 15.
    I need to update a date in the system so the ATP and the MRP planning runs have correct information for promising customers, I will update the Basic Finish date with June 15.
    I also need to keep the original June 1 date in order to measure the shop floor performance to the production schedule to measure how early or late the  order was delivered. How can I keep the original finish date or how can I measure if a process order is early or late??
    Thank you for your help,
    Greg

  • Using attribute as a set of data and parsing this data

    Hi everyone,
    I present below a (little) challenge with the use of attributes in XQuery. Consider the following XML document:
    <showroom>
    <car id="1">
    <name>Clio</name>
    <family>Renault</family>
    </car>
    <car id="n">
    <name>Q5</name>
    <family>Audi</family>
    </car>
    </showroom>
    Each client of the showroom is identified by a unique Id (e.g., 1,2,3,....). Then, i want to add some data to my XML document which should represent, for each car, the set of all clients' Id that have rented this car.
    The desired XML document could look like this:
    <showroom>
    <car id="1">
    <name>Clio</name>
    <family>Renault</family>
    +*<history>*+
    +*<client id="2"/>*+
    +*<client id="23"/>*+
    +*</history>*+
    </car>
    <car id="n">
    <name>Q5</name>
    <family>Audi</family>
    +*<history>*+
    +*<client id="56"/>*+
    +*</history>*+
    </car>
    </showroom>
    However, by using elements in order to represent the rental historic, the document's size will increase significantly.
    As i use only the clients' id, are there any way to represent the history data using only attributes ?+.
    In the following document, the clients' id are represented, as a set, through the attribute +@history+:
    <showroom>
    <car id="1" history="2,23">
    <name>Clio</name>
    <family>Renault</family>
    </car>
    <car id="n" history="56">
    <name>Q5</name>
    <family>Audi</family>
    </car>
    </showroom>
    However, are there any way to check if a given car of id='x' has been rented by a client of Id='y' ?+.
    Does someone know how to represent the history data (sequence of clients' id), using only attributes, and how to look for a given client's id as explained above ?
    Please suggest. I appreciate your help.

    The two following documents represent examples of the showroom data and the clients' data respectively:
    First document:
    <showroom>
    <car id="1">
    <name>Clio</name>
    <family>Renault</family>
    </car>
    <car id="n">
    <name>Q5</name>
    <family>Audi</family>
    </car>
    </showroom>
    Second document:
    <clients>
    <client id="2">
    <name>...</name>
    <firstname>...</firstname>
    <driverLicence serialNumber="2156311"/>
    </client>
    </clients>
    The DTDs of these documents are defined as follows:
    The showroom DTD:
    <!ELEMENT showroom (car)*>
    <!ELEMENT car (name,family)>
    <!ELEMENT name (#PCDATA)>
    <!ELEMENT family (#PCDATA)>
    <!ELEMENT N3 (#PCDATA)>
    <!ATTLIST car id ID #REQUIRED>
    The clients DTD:
    <!ELEMENT clients (client)*>
    <!ELEMENT client (name,firstname,driverLicence)>
    <!ELEMENT name (#PCDATA)>
    <!ELEMENT firstname (#PCDATA)>
    <!ELEMENT driverLicence EMPTY>
    <!ATTLIST client id ID #REQUIRED>
    <!ATTLIST driverLicence serialNumber ID #REQUIRED>
    Whenever a car is rented, I must add some information either in the same showroom document (it will be better for me) or in another document which relies rented car id with the id of the client which rented this car.
    Thanks in advance for your help.

  • How to stop scheduled ship date and scheduled arrival date from defaulting to sysdate

    Hello,
    We have a business scenario where we are deriving scheduled ship date and scheduled arrival date outside and then imported in the instance with the order. However we find that the scheduled ship date and scheduled arrival date are defaulting to sysdate. The atp flag is set to N for these items. I have checked the defaulting rules, there is no such defaulting rule set for scheduled ship date or arrival date ( screenshot attached) Please share your thoughts on how can I stop scheduled ship date and arrival date date from defaulting to sysdate ?
    Thanks
    Rajesh

    Hi
    Please visit following link. It may be useful.
    How to prevent auto default of schedule ship date in sales order form
    HTH
    sd

  • Basic Start Date and Schedule Start date

    Dear All,
    In a Preventive Maintenance order generated through IP30, I am getting Basic Start Date and Schedule Start date as different dates. For all other orders those date as coming same.   I am using forward Scheduling. Can any one of you please tell me what would be the problem?
    Regards,
    Babu R

    [SAP Note on Scheduling - Note 45433|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=45433]
    Regards,
    Maheswaran.

  • Date and Time Stamp - Data Code

    I am trying to import HD video from a Sony video camera to iMovie, but require date and time stamp data code to display on the video.  The computer imports the video in HD without problem, but does not display the data code information.  Options allow for adjusting the date and time within the video clips, which proves the code is in there somewhere, but there are no options to display the date and time stamps. 
    I have previously accomplished this by running the camera in real time through a Pinnacle movie box, but this is time consuming, and hinders video quality, rendering in standard definition. 
    Can anyone please assist? 
    Thanks

    Date stamp data is not something read by FCP ... try iMovie,
    Alternatively, check the camera's output options, it may be possible to output the data burnt-in on the s-video or some such ... if you have the requisite i/o hardware you could then digitize from that signal path

Maybe you are looking for

  • No file extensions for attachments?

    Any time I attach a document using Mail, it appears as a .doc file (with that file extension). However, when people receive it (both Mac and Windows users), they always say that there is no file extension, or they even say that it is saved as a .mpeg

  • App in Creative Cloud Not Showing Up

    I accessed the download manager and installed Adobe Acrobrat X from it - but I still can't see the app in my creative cloud list. When I re-open the app download manager, Acrobat is showing as "installed" but I can't access the program through the cl

  • Cannot set about:home to stay as home page.

    When I set '''about:home''' as my home page it only lasts until I close Firefox 13.0.1. The next time I start Firefox 13.0.1 it has changed to ''http://www.searchnu.com/406''. I cannot find a program or plug-in that I can remove to get about:home top

  • Dunno how to port forward. Can't play online game (WRT54GS)

    I'm having trouble creating and joining games for a game called Starcraft. I've been to many forums and a couple tech support people told me the problem may be with my security settings with my router. I know the correct port for the game but I'm not

  • HT1349 Why does iPhone ask for apple password after rebooting?

    Why does iPhone ask for apple password after rebooting? It just started to do that recently. I've had iPhone5 for several months now and it just started to do that. Before I could reboot without having to type apple ID password to start using my phon