Forum Discussion

JohnBarulich1's avatar
JohnBarulich1
Qrew Cadet
6 years ago

JavaScript and Date field from table

I am writing some code in which a portion of my task is to retrieve the records from the current day. At first I used the milliseconds returned from the date fields, where I checked to see if the milliseconds given was in between the start of the day and the end of the day. No luck.

Then I tried to using the milliseconds given, created a Date object from it, and created a string of the date from that Date object, which would look like 3272019. I then compare this date string to a string created from the current day.

Both of these were attempts to retrieve records from the current day. Any help would be great
  • AustinK's avatar
    AustinK
    Qrew Commander
    What is the end goal of the code? Can you explain what you are trying to do(past just comparing dates)? There might be a better way to approach it.

    Since this seems to be interfacing with QuickBase could you not just create a report that contains all of the records for today or whatever day and work from there? That way you would not need to figure out this issue in Javascript and would be starting with a correct list of records to begin with.