Date and Time Input Validation

Anyone know a good way to validate date and time that a user is entering on the screen.  Our users want to enter AM and PM time vs. Military time. 
Also, since Input fields don't have an "onBlur" command, what are other companies using in java script.

What type of DATE/TIME validation are you looking for?
If you want to validate the format you could simply set the type to date/time and enable the dovalidate attribute to "TRUE".
for getting onBlur, onChange, etc for your input field you can use bsp:findandreplace.
   <%
  tmp_string =`<input onBlur="javascript:yourjsfunction();"`.
      %>
      <bsp:findAndReplace find    = "<input"
                          replace = "<%= tmp_string %>" >
        <htmlb:inputField id        = "myInputField2"
                          value     = "12345"
                          alignment = "left" />
      </bsp:findAndReplace>
(courtesy Ulli Hoffmann)
Hope this helps.
Regards
Raja

Similar Messages

  • Validation on data and time format

    Hi
    In a flat file a date and time fill in but user.  And the data and time format should always be fill in with the format <DDMMYYYY> <HHMMSS>
    is there a FM which check whether user has put the wrong date format such as <YYYYMMDD> or <MMDDYYYY> instead for the the one mention above. 
    Please advise whether there is a FM which check on the format on the time stamp also.
    Note: the input of the data and time is done by the user.
    Thank

    Hi,
           use the new OOPs concept,
    PARAMETERS dateTYPE c LENGTH 10.
    DATA matcher TYPE REF TO cl_abap_matcher.
    * For date
    matcher = cl_abap_matcher=>create( pattern = `[0-9]{1,2}/[0-9]{1,2}/[0-9]{2,4}`
                                       ignore_case = 'X'
                                       text = date ).
    IF matcher->match( ) IS INITIAL.
      MESSAGE 'Wrong Format' TYPE 'I'.
    ELSE.
      MESSAGE 'Format OK' TYPE 'I'.
    ENDIF.
    like dis pattern for time : 
    [0-9]{1,2}:[0-9]{2}
    pattern for timestamp:
    [0-9]{1,2}/[0-9]{1,2}/[0-9]{2,4} [0-9]{1,2}:[0-9]{2}
    Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 4:35 PM

  • Date and Time validation together...

    Hi,
    I want to have the date and time validation together. Is it posible?
    I am not able to do it using "AT SELECTION-SCREEN".
    e.g.
    DATE1 - DATE2 is 12/22/2009 - 05/27/2010
    TIME1 - TIME2 is 15:00:00 - 01:00:00
    This will result in error because the time1 is more than time2 but it is correct when it is tied to date1.
    I tries to validate them together but it gives the standard error all the time.
    Please help me.
    Thank you.

    Hi,
    You could have a normal range for your date field and two parameters for the times...no?
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) ttime FOR FIELD p_time1.
    PARAMETERS: p_time1 type t.
    SELECTION-SCREEN COMMENT 54(2) tto FOR FIELD p_time2.
    SELECTION-SCREEN POSITION 60.
    PARAMETERS: p_time2 TYPE t.
    SELECTION-SCREEN END OF LINE.
    INITIALIZATION.
       ttime = 'Time'.
       tto = 'to'.
    Kr,
    Manu.

  • Af:inputDate with both date and time: modal popup forces validation

    Hello,
    I am using an af:inputDate with an af:convertDateTime type='both' (displaying date and time).
    When the calendar popup is shown it's a modal popup. I guess it is because of the type='both'?
    My problem is: when the modal popup is shown I get also the validation popup with errors (for example required fields) which is shown too.
    Maybe someone could help?
    Is there a way to force non-modal popup for this kind of calendar?
    Is there a way to stop validation if I am already displaying another popup?
    Thanks in advance,
    Cindy

    Hi,
    U just override ok cancel button type="none"., inside the <af:panelGroupLayout id="pgl10" layout="horizontal" valign="middle">
    <af:commandButton id="ok" text="Ok" action="#{beanName.okAction}" immediate="true"/>
    <af:commandButton id="can" text="Cancel" action="#{beanName.cancelAction}" />
    </af:panelGroupLayout>
    Regards,
    parame

  • Validate Date and Time

    I am using Apex 3.2
    I have a field on my form called P4_START
    It has a format mask of DD.MM.YYYY HH24 MI and a default value of TO_CHAR(SYSDATE, 'DD.MM.YYYY HH24:MI').
    I need to create a validation which fires on save, to ensure the user is inputting a date and time
    Gus

    Gus C wrote:
    I am using Apex 3.2
    I have a field on my form called P4_START
    It has a format mask of DD.MM.YYYY HH24 MI and a default value of TO_CHAR(SYSDATE, 'DD.MM.YYYY HH24:MI').
    I need to create a validation which fires on save, to ensure the user is inputting a date and timeYou could start with a regular expression to ensure that the format of the string is correct.
    You could subsequently then try using a "PL/SQL function return boolean" along the lines of the following:
       declare
          dt_dummy date;
       begin
          dt_dummy := to_date(:P4_START,'DD.MM.YYYY HH24:MI');
          return true;
       exception
       when others then
          return false;
       end;Note the intentional use of the 'when others' clause here - this is one of the few places where I think it might legitimately be used because we know that, whatever the problem, that date format isn't right (although might consider testing for specific exceptions like -01858 to differentiate between that and something more sinister).
    edit: Hang on a minute... what am I thinking? Why not just use a date picker?
    Edited by: Joel_C on 18-Jul-2012 11:51
    Edited by: Joel_C on 18-Jul-2012 11:56

  • Date (date and time) with MySQL, register here!

    Hi,
    Summary:
    I have a page (form) to capture attendance. It works, it allows user to enter their attendance details. On click, it writes to the database - table. The date is not captured on the form. I want to date stamp this by inserting a date (date and time - declared field). I will provide source code. Please pin point what code I should be inserting and wheres about within this code.
    Question:
    Insert date and time into database table -
    Code:
    <?php require_once('Connections/dbAttendance.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form")) {
      $insertSQL = sprintf("INSERT INTO attendlist (Windowsid, title, firstname, surname, extension, mobile, jobrole, course, cpg, mgrname, room) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['textfield'], "text"),
                           GetSQLValueString($_POST['select'], "text"),
                           GetSQLValueString($_POST['textfield2'], "text"),
                           GetSQLValueString($_POST['textfield3'], "text"),
                           GetSQLValueString($_POST['textfield4'], "text"),
                           GetSQLValueString($_POST['textfield5'], "text"),
                           GetSQLValueString($_POST['select5'], "text"),
                           GetSQLValueString($_POST['select2'], "text"),
                           GetSQLValueString($_POST['select4'], "text"),
                           GetSQLValueString($_POST['textfield7'], "text"),
                           GetSQLValueString($_POST['select3'], "text"));
      mysql_select_db($database_dbAttendance, $dbAttendance);
      $Result1 = mysql_query($insertSQL, $dbAttendance) or die(mysql_error());
      $insertGoTo = "Thankyou.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    mysql_select_db($database_dbAttendance, $dbAttendance);
    $query_rsAttendance = "SELECT * FROM attendlist";
    $rsAttendance = mysql_query($query_rsAttendance, $dbAttendance) or die(mysql_error());
    $row_rsAttendance = mysql_fetch_assoc($rsAttendance);
    $totalRows_rsAttendance = mysql_num_rows($rsAttendance);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Delegate Register</title>
    <link href="Registerpage.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
    </head>
    <?php
    $date = date(“format”, $timestamp);
    ?>
    <body>
    <div class="container">
      <div class="header"><img src="Cerner At Imperial2.jpg" width="960" height="150" alt="" /><!-- end .header --></div>
      <div class="content">
        <h3>Register: <?php echo "Date  - ".date("d/m/Y - H:ia")?></h3>
        <form action="<?php echo $editFormAction; ?>" method="post" name="form">
          <table width="780" border="0">
            <tr>
              <td><div align="right">User ID *</div></td>
              <td><span id="sprytextfield1">
                <input name="textfield" type="text" id="textfield" tabindex="1" size="18" maxlength="10" />
              <span class="textfieldRequiredMsg">A value is required.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">Title *</div></td>
              <td><span id="spryselect1">
                <select name="select" id="select" tabindex="2">
                  <option value="0">Select</option>
                  <option value="1">Ms</option>
                  <option value="2">Mrs</option>
                  <option value="3">Mdm</option>
                  <option value="4">Dr</option>
                  <option value="5">Mr</option>
                  <option value="6">Prof</option>
                </select>
              <span class="selectRequiredMsg">Please select an item.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">First name*</div></td>
              <td><span id="sprytextfield2">
                <input name="textfield2" type="text" id="textfield2" tabindex="3" size="30" maxlength="30" />
              <span class="textfieldRequiredMsg">A value is required.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">Surname *</div></td>
              <td><span id="sprytextfield3">
                <input name="textfield3" type="text" id="textfield3" tabindex="4" size="30" maxlength="30" />
              <span class="textfieldRequiredMsg">A value is required.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">Contact / Bleep *</div></td>
              <td><span id="sprytextfield4">
                <input name="textfield4" type="text" id="textfield4" tabindex="5" size="30" maxlength="30" />
              <span class="textfieldRequiredMsg">A value is required.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">Mobile no: (optional)</div></td>
              <td><input name="textfield5" type="text" id="textfield5" tabindex="6" size="20" maxlength="20" /></td>
              <td> </td>
            </tr>
            <tr>
              <td> </td>
              <td> </td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">Job Role *</div></td>
              <td><span id="spryselect5">
                <select name="select5" id="select5" tabindex="7">
                  <option value="0">Select </option>
                  <option value="1">Doctor</option>
                  <option value="2">Nurse IP</option>
                  <option value="3">Nurse OP</option>
                  <option value="4">Midwife</option>
                  <option value="5">Booking Clerk</option>
                  <option value="6">Medical Secretary</option>
                  <option value="7">OP Receptionist</option>
                  <option value="9">CNS/NP</option>
                  <option value="10">Tester</option>
                </select>
              <span class="selectRequiredMsg">Please select an item.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">Manager's Name *</div></td>
              <td><span id="sprytextfield5">
                <input name="textfield7" type="text" id="textfield7" tabindex="8" size="30" maxlength="30" />
              <span class="textfieldRequiredMsg">A value is required.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td> </td>
              <td> </td>
              <td> </td>
            </tr>
            <tr>
              <td> </td>
              <td> </td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">Course *</div></td>
              <td><span id="spryselect2">
                <select name="select2" id="select2" tabindex="9">
                  <option value="0">Select</option>
                  <option value="1">Demo</option>
                  <option value="2">Doctors</option>
                  <option value="9">CNS/NP</option>
                  <option value="3">Nurse IP</option>
                  <option value="4">Nurse OP</option>
                  <option value="5">Midwife</option>
                  <option value="6">Booking Clerk</option>
                  <option value="7">Medical Secretary</option>
                  <option value="8">OP Receptionist</option>
                </select>
              <span class="selectRequiredMsg">Please select an item.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">Location *</div></td>
              <td><span id="spryselect3">
                <select name="select3" id="select3" tabindex="10">
                  <option value="0">Select </option>
                  <option value="1">CHX 12 Floor Rm 1</option>
                  <option value="2">CHX 12 Floor Rm 2</option>
                  <option value="3">CHX 10 West </option>
                  <option value="4">HH N207 </option>
                  <option value="5">HH W12 Conference</option>
                  <option value="6">SMH Rm a</option>
                  <option value="7">SMH Rm b</option>
                  <option value="8">SMH Ming Wing Rm 5</option>
                  <option value="9">SMH Ming Wing Rm 3</option>
                </select>
              <span class="selectRequiredMsg">Please select an item.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">CPG *</div></td>
              <td><span id="spryselect4">
                <select name="select4" id="select4" tabindex="11">
                  <option value="0">Select </option>
                  <option value="1">CPG 1 - Medicine</option>
                  <option value="2">CPG 2 - Surgery and Cancer</option>
                  <option value="3">CPG 3 - Specialist Services </option>
                  <option value="4">CPG 4 - Circulatory Services and Renal Medicine</option>
                  <option value="5">CPG 5 - Womens and Children</option>
                  <option value="6">CPG 6 - Clinical and Investigative Sciences</option>
                  <option value="7">CPG 7 - Private Patients</option>
                  <option value="8">Others</option>
                </select>
              <span class="selectRequiredMsg">Please select an item.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td> </td>
              <td><input name="button" type="submit" id="button" value="Submit" /></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="center">*Mandatory fields </div></td>
              <td> </td>
              <td> </td>
            </tr>
          </table>
          <input type="hidden" name="MM_insert" value="form" />
        </form>
    <!-- end .content --></div>
      <div class="footer">
    <p align="center">
        <a href="http://validator.w3.org/check?uri=referer"><img
          src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
          <p align="center"> Cerner@Imperial ICT Training Team </p>
    </p>
      <!-- end .footer --></div>
      <!-- end .container --></div>
    <script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["blur", "change"]});
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {validateOn:["change", "blur"]});
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {validateOn:["blur", "change"]});
    var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "none", {validateOn:["blur", "change"]});
    var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "none", {validateOn:["blur", "change"]});
    var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2", {validateOn:["change", "blur"]});
    var spryselect3 = new Spry.Widget.ValidationSelect("spryselect3", {validateOn:["change", "blur"]});
    var spryselect4 = new Spry.Widget.ValidationSelect("spryselect4", {validateOn:["change", "blur"]});
    var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "none", {validateOn:["blur", "change"]});
    var spryselect5 = new Spry.Widget.ValidationSelect("spryselect5", {validateOn:["blur", "change"]});
    </script>
    </body>
    </html>
    <?php
    mysql_free_result($rsAttendance);
    ?>

    There are several ways. One is to get the date from the php time() function and use that in your insert statement. Another is to use MySQL CURDATE() function. But probably the easiest and best is to simply define the default value for the date/time column as the current date/time and exclude it from the insert statement. No code changes necessary.
    http://dev.mysql.com/doc/refman/5.0/en/timestamp-initialization.html

  • Credit block and release Date and time

    Dear All,
    I require a report which can display credit block status date and time and  credit release status date and time for sales order. I have gone through the report RSSCD100 with object class VERKBELEG.It is not fullfilling the requirement as it only display change information.
    If customer has already exceeded the credit limit and new sales order has been generated then this report will reflect its blocked status.
    Kinldy help
    Thank you,
    NoMi

    Hi,
    IF it is not mentioned in single program .
    You can develop a query by using multiple program. Please find the list of programs for CM
    +Reports for Credit Management+
    The following table provides an overview of all the reports available to you in the area of credit
    management
    Program Function
    RFDKLI10 Customers with missing credit data
    This report checks the data for the credit limit for completeness, and produces
    the corresponding error lists. These can be used to re-maintain the
    corresponding definitions manually, or per Batch Input.
    RFDKLI20 Reorganization of credit limit for customers
    This report enables you to reorganize the credit limit information in the control
    areas.
    RFDKLI30 Short overview credit limit
    The report lists the central and control area-related data per customer.
    RFDKLI40 Overview credit limit
    The report provides you with an extensive overview of the customeru2019s credit
    situation.
    RFDKLI41 Credit master sheet
    The credit master sheet enables you to display and print out the customer
    master data for a single account, which is needed for the area of credit
    management.
    RFDKLI42 Early warning list
    The early warning list enables you to display and print out customers in credit
    management, who are viewed as critical customers in the area of credit checks
    in SD.
    RFDKLI43 Master data list
    The master data list enables you to display and print out customersu2019 credit cards.
    In particular, you can display information not contained in the standard system,
    for example, user-defined fields or external data, which you have created with
    specific additonal software.
    RFDKLI50 Mass change credit limit data
    This report allows quick mass change for master data in credit management.
    RFDKLIAB Change display, credit management
    With this report, you can display changes for credit management master data for
    all accounts.
    RVKRED06 Checking blocked credit documents
    The report checks all blocked documents from credit view. The report is started
    in the background, and should run after the incoming payments programs.
    FI/SD - Credit Management/Risk Management SAP AG
    Reports for Credit Management
    RVKRED77 Reorganization credit data SD
    The report enables you to reorganize open credit, delivery and billing document
    values. It is used, for example, when updating errors occur.
    RVKRED08 Checking sales documents which reach the credit horizon
    The report checks all sales documents, which reach the dynamic credit check
    horizon, as new. The report runs periodically, and should run at the start of a
    period. The period for the u2018date of the next credit checku2019 is proposed from the
    current date, with the help of the period split for open sales order values.
    RVKRED09 Checking the credit documents from credit view
    Released documents are only checked if the validity period for the release has
    run out (number days).
    RVKRED88 Simulation reorganization credit data SD
    REgards,
    Krishna O
    Edited by: Krishna O on May 20, 2010 11:30 AM

  • Cisco SPA525g2 Date and time Not Synced with the PBX server

    Hello,
    We have a couple of SPA525g2 phone connected and registered to our PBX server. We were able to configure 3 extensions on different lines of the phone. However, at times we were encountering issues with the other lines configured on the phone. There are times wherein 1  extension configured on the phone is having one way audio issue, but the other extensions configured on the same phone is working fine. and we have to reboot/reset the phone several times for all the extesions configured on the phone to work.
    Also, whenever we reset the phone, the date and time will be way way behind the current date and time, eventhough we have already set the correct date and time before we reset the phone.
    How can we resolve the one way audio issue on 1 or 2 extensions of the phone, while the other extensions configured to it is working fine?
    How can we make the phone sync the date and time with the PBx server?
    Any input and help regarding this issue is greatly appreciated...
    Btw, date and time  issue not sync with the PBX server is just happening on SPA525g2, we have other phones like SPA303, SPA504, and SPA232D/SPA302D. All other phones' date and time is in sync with the server even though we reset them except SPA525g2.
    Thank you very much,

    PeterMacSF,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://forums.novell.com/

  • Incrementing a string number for date and time

    There are probably a lot of ways to do this, but I only want to use a bunch of if - else loops if I really need to.
    I have a date and time for input, let's say 2006-04-19 22:00. In Java, if I convert that to 3 integers (year, month, day), it will output 2006-4-19. I need to be able to increment in a loop for every day and month from one date to the next. If I keep it as a string, I won't be able to increment the value though, (at least I'm not sure how). I'm thinking that even if I converted it to an integer and back to a string, that the leading zero would be removed.
    I found a post here that said something about formatting the number with 2 numbers, by using:
    DecimalFormat format = new DecimalFormat("00");
    format.format(1, sb, new FieldPosition(0));
    Or is there a way to use the gregorianCalendar stuff that would output the date with all of the zeros in place, while incrementing and looping correctly?
    Thanks.

    I would get a Date object--you can use java.text.SimpleDateFormat if you're starting with a String--and use that to create a GregorianCalendar. Then you can just call Calendar's add method to add one to whichever field you want. Use the SimpleDateFormat to turn the date back into a String for display again.
    Calculating Java dates: Take the time to learn how to create and use dates
    Working in Java time: Learn the basics of calculating elapsed time in Java
    Formatting a Date Using a Custom Format
    Parsing a Date Using a Custom Format

  • Get-Hotfix InstalledOn property not returning hotfix installed Date and Time on Windows Server 2008 SP2 but works on Windows Server 2008 R2 SP1

    Hi,
          I am working on a validation script to get the list of hotfixes installed on Domain Controllers every month as part of our monthly DC patching process. I have been successful in getting these details for DC's with (Windows Server 2008
    R2 SP1, Powershell v2.0) using the below command. 
    Get-HotFix -cn $computer | Select-Object PSComputerName,HotFixID,Description,InstalledBy,InstalledOn | where InstalledOn -ge (Get-Date -Day 1 -Format d) | FT -AutoSize
    I execute the above from a jump box with powershell v4.0 (Server 2008 R2)
    However, when I try the same command from the jump box to query DC's with (Server 2008 SP2, powershell v2.0). It doesn't return the InstalledOn date and time. It was giving error for the InstalledOn property and hence I renamed it to $_.InstalledOn. Now
    I don't get error but still no details displayed for InstalledOn property.
    I tried using the below, as could see on few forums that this might resolve the issue. I also tried removing the "where" part but still no installation date returned. 
    Get-HotFix -cn $computer | Select-Object HotFixID, Description, InstalledBy, @{l="InstalledOn";e={[DateTime]::Parse($_.psbase.properties["installedon"].value,$([System.Globalization.CultureInfo]::GetCultureInfo("en-US")))}}
    | where {$_.InstalledOn -ge (Get-Date -Day 1 -Format d)} | FT -AutoSize
    Have tried this locally on the 2008 SP2 DC but still not working. Please advise what is going wrong? 
    Note: If I execute the below command locally on the 2008 SP2 DC, I am getting the InstalledOn output. However, when executed from the jump box with powershell v4.0 (Server 2008 R2) to query
    the same 2008 SP2 DC, it just gives the prompt again without any error or output. This behavior is consistent for other 2008 SP2 DC's in the environment.
    Get-HotFix -cn $computer | Select-Object HotfixID,Description,InstalledBy,InstalledOn | where {$_.InstalledOn -ge (Get-Date -Day 1 -Format d)} | FT -AutoSize

    Hi jrv, I have already tried the Win32_QuickFixEngineering option, which doesn't work either. Apologies for not mentioning the workarounds that I have already tried.
    Get-Hotfix seems to be just a wrapper for Win32_QuickFixEngineering as per the below article. (http://technet.microsoft.com/en-us/library/hh849836.aspx)
    I have seen a mention of using the WU ActiveX control on few forums, but was too lazy to read it through.
    After rigorous testing, it makes me realize that somewhere the Get-Hotfix dates formatting\comparison isn't working. 

  • Selection Screen - Date and Time

    Hi,
    I have given a selection screen where the user needs to key in the input in the following format
    dd.mm.yyyy hh:mm:ss.
    Reason is that the database fetching these elements accepts only in this criteria.
    Now as they look into automating this program, they would want to automatically take the current system date and time - 24 hours .
    How do I achieve this in the above format? If this is not possible, let me know if i can make the selection screen with normal sap date format and convert it to the above format on passing to the select statement.
    Regards
    Sam

    Hi Sam,
    See this. Is this your requirement.
    With this we are able to get Current time-stamp to selection parameter.
    REPORT ZTEST.
    DATA: L_TS TYPE TZNTSTMPS,
           L_TS_C TYPE CHAR14.
    PARAMETERS:
    P_TMSTMP TYPE TMSTMP OBLIGATORY MEMORY ID TEST.
    INITIALIZATION.
       GET TIME STAMP FIELD L_TS.
       MOVE L_TS TO L_TS_C.
       SET PARAMETER ID  'TEST' FIELD L_TS_C.
    The output is
    Jogeswara Rao K

  • Wrote the current Date and Time in the backend

    HI everyone,
    I created a table view, where I display several records. Right now I will add an record to this table, which should be written back in the backend and automaticaly add the current date and time.
    But I don´t know to make this. I tried several time with the funktion  "now()", but it doesn´t work. So any help for me, to explain how I can display the actual time and then write it back to the backend?
    Thanks

    we use a crm system. but the BAPI I mentioned was
    just to play with. My basis will develop a new API
    for the project, that have the requested Inputfields.
    But what I tottaly forget was, that there has to be a
    field for the time, so thanks for the advice.
    No Problem.
    I´m still of the opinion , that it should be possible
    to add the curret time in a field with the
    funcionality of the VC, even there is a way to show a
    clock with the current time. My problem is that I
    can´t figuer out how to do this.
    Therefore you can use the TNow() function (Time functions) and the Now() Function (Date functions). You can cast them to a string and concatenate the string, then you have the date of today with the current time. This string you can format and transfer it as input for your BAPI_ADD_BP for example.
    Hope that helps.
    Best Regards,
    Marcel

  • How to detect the iPhone Date and Time

    Hi guys,
    I am new this plateform and I am working on an iPhone application in Objective-C. I need to detect the date and time of iphone clock in the objective-c.
    Please let me know if anybody knows how can I do it.
    Thanks,
    Ranjit Singh

    Ranjit,
    Be sure to consult the docs for the iPhone SDK. If you are running the simulator, you probably have access to frameworks and classes not available on the phone itself. The iPhone docs don't show NSCalendarDate as a valid class for iPhone (but it exists for MacOS). I think you'll need to use NSCalendar if you wish to have it run on the device (and not just the simulator).
    Do you have a device you are testing on? It would be good to verify this (I don't and therefore must use the simulator).
    Cheers,
    George

  • I'm trying to display the current date and time on my iPad.

    First, I'm not sure this is a valid post to this forum.  If not, I'd appreciate knowg in where I can get help. 
    I have tried several ways to display the current date and time on my iPad.  None  work.  Most things I try give me complier errors but the latest code compiles but won't display the correct time. 
    Here's the dispatch code in my ViewController.m file:
    dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul);
        dispatch_async(queue, ^{
            [NSTimer scheduledTimerWithTimeInterval:NSTimeInterval)1.0f target:self selector:@selector(updateLabel:) userInfo:nil repeats:YES];
    Here's the updateLabel code: (which never gets executed).
    - (void)updateLabel:(id) sender {
        dispatch_sync(dispatch_get_main_queue(), ^{
        NSLog(@"Datefield Update Called");
        NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
        [dateFormatter setDateFormat:@"EEEE, MMMM dd, yyyy 'at' HH:mm  ZZZZ"];
        NSDate *dayTime = [NSDate date];
        NSString *formattedDateString = [dateFormatter stringFromDate:dayTime];
            _dateField.text = formattedDateString;
        [self.view addSubview:_dateField];
        NSLog(@"Datefield %@",_dateField.text);

    Your code is needlessly complicated and has a few problems:
    // These objects should be created only once.
    NSTimer *dateAndTimeTimer; (You might need to make this a property with a strong reference).
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
    [dateFormatter setDateFormat:@"EEEE, MMMMM dd, yyyy 'at' HH:mm ZZZZ"];
    // The subview should only be added once.
    [self.view addSubview:_dateField];
    [self performSelectorOnMainThread:@selector(startDateAndTimeTimer)
                            withObject:nil
                         waitUntilDone:YES];
    -(void)startDateAndTimeTimer
        NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:1
                                                          target:self
                                                        selector:@selector(updateLabel)
                                                        userInfo:nil
                                                         repeats:YES];
        dateAndTimeTimer = timer;
        [[NSRunLoop mainRunLoop] addTimer:dateAndTimeTimer forMode:NSRunLoopCommonModes];
    -(void)updateLabel
         NSDate *dateTime = [NSDate date];
         NSString *formattedDataString = [dateFormatter stringFromDate:dateTime];
         _dateField.text = formattedDateString;
         NSLog(@"_dateField.text=%@", _dateField.text);

  • Help adding current Date and Time stamp to file name

    I need help with my script adding current Date and Time stamp to file name.
    This is my file name = myfile.htm
    I would like to save it as = myfile.htm 8/29/2007 11:41 AM
    This is my script:
    <script>
    function doSaveAs(){
         if (document.execCommand){
              document.execCommand('SaveAs','1','myfile.htm')
         else {
              alert("Save-feature available only in Internet Exlorer 5.x.")
    </script>
    <form>
    <input type="button" value="Click here to Save this page for your record" onClick="doSaveAs()"
    </form>
    Thank you

    I agree, I guess I overlooked that!
    I would like to save it as = myfile 8/29/2007 11:41 AM .htm
    I need help with my script adding current Date and Time stamp to file name.
    This is my file name = myfile.htm
    I would like to save it as = myfile 8/29/2007 11:41 AM .htm
    This is my script:
    <script>
    function doSaveAs(){
    if (document.execCommand){
    document.execCommand('SaveAs','1','myfile.htm')
    else {
    alert("Save-feature available only in Internet Exlorer 5.x.")
    </script>
    <form>
    <input type="button" value="Click here to Save this page for your record" onClick="doSaveAs()"
    </form>

Maybe you are looking for

  • How can I fix my mail problem?

    I have a Macbook Pro running OS X Snow Leopard 10.7.5.  My mail app is constantly asking me to re-enter my password, also there is checkbox that says, "Remember this password in my keychain". By the way I am using a Yahoo mail account. First I tried

  • When using Quite Imposing Plus the resulting file is only given a Temp name which will be sent as the document name.

    Our company has recently upgraded form Acrobat Professional 8 to Acrobat professional XI. We also use the Quite Imposing Plus plug-in in both versions. Now when using Quite Imposing Plus the resulting file is only given a Temp name which will be sent

  • Can't add tracks to existing playlists using iTunes for Windows11.1.5.5

    The tried and true method of right clicking a track, selecting "Add To Playlist" and selecting a playlist no longer works.  There's not response to the end of the process.  I'm just back in the original view of the library.  When I check the playlist

  • Problems with jdk 1.4.2_03

    Hi, I know that this question has been made many times but I can't get solve my problem. I have jdk 1.4.2_03 and I'm using IE 6 I have been reading "Getting started" tutorial and I can't see the applet , the java console sends a lot of errors: java.l

  • New Batch Determination procedure for consginment issue delivery

    Hi SD Gurus, We have a requirement to determine batches of Consignment fill up delivery automatically in Consignment issue delivery.Batches are entered manually in Consign fill up delivery. A consignment issue order is always created with reference t