Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

179
Views
I want to fetch the '_ts' value from cosmosDB as a datetime string in my code to view to the user as to show when the data was recorded
          {selectedDate == "aN-aN-NaN" ? (
        <View style={{ alignSelf: "center", marginVertical: 20 }}>
          <WfTextRedItalic>Please Select a date first</WfTextRedItalic>
        </View>
      ) : attendanceRecorded === false && recordedDate !== undefined ? (
        <View style={{ alignSelf: "center", marginVertical: 20 }}>
          <WfTextGreenNormal>
            Attendance was last recorded on {recordedDate}
          </WfTextGreenNormal>
        </View>
      ) : attendanceRecorded === false && recordedDate === undefined ? (
        <View style={{ alignSelf: "center", marginVertical: 20 }}>
          <WfTextYellowItalic>Please Mark Attendance</WfTextYellowItalic>
        </View>
      ) : (
        <View style={{ alignSelf: "center", marginVertical: 20 }}>
          <WfTextGreenNormal>
            Attendance recorded for date {selectedDate}
          </WfTextGreenNormal>
        </View>
      )}

As you can see in the above code the 'recordedDate' is what I want to set the value of ts as Im using type script and nodejs

The current items that are fetched or posted from my ClassAttendance Container are :

export declare class ClassAttendance {
id: string;
studentId: string;
classProfileId: string;
dateAttended: string;
studentAttended: "Yes" | "No" | "Partial";
teacherId?: string;
lessonId?: string;
startTime?: string;
endTime?: string;
connectionProblem?: boolean;
constructor(studentId: string, classProfileId: string, dateAttended: string, studentAttended?: "Yes" | "No" | "Partial", teacherId?: string, lessonId?: string, startTime?: string, endTime?: string, connectionProblem?: boolean);

If any more info is needed please let me know Im new to working with this code

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!