storing a string data in access

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tedpottel@gmail.com

    storing a string data in access

    Hi
    I have
    access.Fields(" Time").value=t
    I would like t to be a string reprsenting a data. How can I do this?
  • alex23

    #2
    Re: storing a string data in access

    On Nov 3, 3:47 am, "tedpot...@gmai l.com" <tedpot...@gmai l.comwrote:
    Hi
    I have
    access.Fields(" Time").value=t
    I would like t to be  a string reprsenting a data.  How can I do this?
    t = "string representing a datum"
    access.Fields(" Time").value = t

    Comment

    • Tim Arnold

      #3
      Re: storing a string data in access

      "alex23" <wuwei23@gmail. comwrote in message
      news:fc4ea747-e415-4571-9c2d-14a2210c272f@t1 8g2000prt.googl egroups.com...
      On Nov 3, 3:47 am, "tedpot...@gmai l.com" <tedpot...@gmai l.comwrote:
      >Hi
      >I have
      >access.Fields( "Time").val ue=t
      >I would like t to be a string reprsenting a data. How can I do this?
      >
      t = "string representing a datum"
      access.Fields(" Time").value = t
      maybe OP means t = "string representing a date", but I'm just guessing.

      --Tim Arnold


      Comment

      • alex23

        #4
        Re: storing a string data in access

        On Nov 4, 3:53 am, "Tim Arnold" <tim.arn...@sas .comwrote:
        "alex23" <wuwe...@gmail. comwrote:
        t = "string representing a datum"
        access.Fields(" Time").value = t
        >
        maybe OP means t = "string representing a date", but I'm just guessing.
        Oops, that totally didn't occur to me. You'd think the field's key
        would've been a giveaway :)

        ted: take a look at the time module, it's part of the standard
        library.

        import time
        access.Fields(" Time").value = time.strptime(' 10:00AM', '%I:%M%p')




        Comment

        Working...