Android Question Statemanager save as a Long type

Discussion in 'Android Questions' started by trueboss323, May 15, 2015.

  1. trueboss323

    trueboss323 Active Member Licensed User

    Hello, I have Statemanager for saving settings and I use this code
    Code:
    StateManager.SetSetting("Starttime"DateTime.Date(DateTime.Now)&" " & DateTime.Time(DateTime.Now))
    But the problem I think it saves the value as a string, so how can I save it as a Long value?
     
  2. DonManfred

    DonManfred Expert Licensed User

    Sure. You ARE giving a STRING...

    Code:
    StateManager.SetSetting("Starttime"DateTime.Now)
     
    Erel likes this.
  3. trueboss323

    trueboss323 Active Member Licensed User

    So how can I convert and save it as a Long type?
     
  4. DonManfred

    DonManfred Expert Licensed User

    Code:
    dim dt as Long = Datetime.now
    StateManager.SetSetting(
    "Starttime", dt)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice