SQL To JDEdwards Date Conversion

Apr 24, 2017JDEdwardsSQL
Summarize with AI: Google AI Claude ChatGPT Perplexity Grok

AI links open with a title + excerpt (these tools can't fetch the page themselves) — use "Copy full article" to paste the complete text for a fuller summary.

Share:

Once Linked JDEdwards database in our MS-SQL database under the Linked server and when we going to see the data it should be encrypted. Here I am show to how to see data like as MS-SQL.

Actual JDEdwards data

My linked server name is “TESTDTA” (JDEdwards database). Open new query window type the below query & press (F5).

SELECT VJDGJ FROM [TESTDTA].[F1001]

Output

JDE1.png

Convert AS SQL Data

SELECT (DATEADD(DAY, VJDGJ % 1000, DATEADD(YEAR, VJDGJ / 1000, -1))) FROM [TESTDTA].[F1001]

Output

 Jde2.png

Meanwhile we can insert the data to JDEdwards and without convention, it’s shouldn’t effect on JDEdwards table. So before insert data convert like a below query.

--INSERT INTO [TESTDTA].[F1001] (VJDGJ) SELECT (1000 * DATEDIFF(YEAR, 0, GETDATE()) + DATEPART(DAYOFYEAR, GETDATE()))

Output

jde3.png

#JDEdwards#SQL

Comments

Be the first to comment.

Leave a comment

Never shown publicly.

Comments are reviewed before appearing publicly.