Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8522691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:11:46+00:00 2026-06-11T07:11:46+00:00

I have an activity where i want to to save some measures data into

  • 0

I have an activity where i want to to save some measures data into a sqlite database(i will have only insert option).The xml is:

enter image description here

date / time is taking value(by date/time dialogs) after the create of this activity,then user can change it if he wants.

I want in another activity to have listview of measures by descending date + time.

I want also to be able to fetch the measures of last 1 / 7 / 30 days.

What is the best way to make the sqlite table?How i should save date + time?together?or not?as TEXT or REAL or INTEGER so that can i easily make the above operations?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:11:48+00:00Added an answer on June 11, 2026 at 7:11 am

    You should use System.currentTimeMillis() and store that BIGINT value in the table. You can parse the time with something like this:

        SimpleDateFormat sdf = new SimpleDateFormat("MM dd,yyyy HH:mm");
    
        Date resultdate = new Date(yourmilliseconds);
        System.out.println(sdf.format(resultdate));
    

    Source: How to transform currentTimeMillis to a readable date format?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an activity that uses AsyncTask to download and save some data to
in my app i have activity with XML layout, i want to build an
I have an activity with some views, after doing some stuff I want to
I have a database in one activity that I want to open in another
I have a problem with my android-app. I want to save a Data-list in
I have a fragment and for screen rotation I want to save some states
I want to save images in android using SharedPreference. I have two activity classes,
I have a phonegap activity which I want to start via a button press:
I have an Activity which uses a Fragment . I simply want to pass
I have an activity, I'll call it mainactivity for now. And I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.