insert date time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • countryboy
    New Member
    • Jul 2007
    • 13

    #1

    insert date time

    i am making a macro to sort a form at the end of my macro i want to put the form name that stays the same but i would like to insert the date and time, I can edit the macro with VB the line looks something like this "form name" "07/30/07 17:45"
    could some tell me the correct code for inserting date and time? and how to make it code and not text?

    thanks
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by countryboy
    i am making a macro to sort a form at the end of my macro i want to put the form name that stays the same but i would like to insert the date and time, I can edit the macro with VB the line looks something like this "form name" "07/30/07 17:45"
    could some tell me the correct code for inserting date and time? and how to make it code and not text?
    I think we need you to fill in a few gaps. For example...
    • A macro in what - Excel? Word? Access? Other?
    • What version?
    • What exactly do you want to do with the form name and date/time? "Insert" them where?

    Comment

    • countryboy
      New Member
      • Jul 2007
      • 13

      #3
      date and time

      the main program is IBM reflections thats where i made the macro just by clicking record and then it records my actions key strokes mouse clicks etc. at the top of the page you click on macro and you get a drop down menu then you have options like run,delete,edit (the macro) when you click on edit it opens the macro in visual basic 6. it seemed pretty simple all i had to do was add a line of code where i wanted the date and time to show up. I did a search and i see there are many many ways to display the date and time.

      <?php date("F j, Y, g:i a"); ?>

      document.write( "The current date is: ")
      document.write( FormatDateTime( Date(),1))

      document.write( Now)

      <script type="text/vbscript">
      document.write( "Today's date is " & date())
      document.write( "<br />")
      document.write( "The time is " & time())
      </script>


      i don't know why there are so many roads to the same place? and all examples are for html so will any of the above work? i am guessing that i do not use html tags? i this is a macro i want to run everyday but i want the date and time to change.


      Thanks
      Last edited by countryboy; Aug 1 '07, 04:28 AM. Reason: add info

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        I'm not familiar with the product. But if it opened the macro in VB, then my guess is that the VBscript example would be the one to try.

        Comment

        Working...