-3

I am working on lambda project; I am fetching data from a SQL Server database and passing it to an API, and then that data is saved to another SQL Server database table through AWS lambda.

The issue is data is saved in unwanted format as shown here:

enter image description here

In this screenshot, the time 23:00 highlighted in yellow; I am not able to get some records are saved correctly while some are not are not is is lambda issue

2
  • 2
    So what is unwanted about a 23:00 timestamp?¨ Commented Jun 16 at 14:57
  • 1
    Please note that the 'format' might be the result of the SQL client you are using, rather than the actual data saved in the database. You can check this by casing the field to VARCHAR to see its 'raw' content. Commented Jun 18 at 5:00

1 Answer 1

0

That is not a formatting issue but time zone. The clue is that the "error" is exactly 1 hour from midnight. You haven't given sufficient information/detail for a solution to be offered but here's what you need to do...

  1. Know where the date should be coming from.
  2. Find out where it is coming from. (Should a SQL script or trigger be inserting using the database datetime, so all entries in the table are date-stamped using the same clock? Or do you want to send a local client-side (or other-server-side) value across the wire to the central database?) Your problem here is clearly that you have done a bit of both from time zones 1 hour apart.
  3. Then (a) once you have a clear notion of how it should work, if (b) resolving time zone differences is necessary and (c) you are still uncertain... then post another question providing the details, related program code and database scripts/procs.

Good luck

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.