0% found this document useful (0 votes)
235 views14 pages

Date Business Functions in The EnterpriseOne

Document 626493.1 provides a detailed overview of Date Business Functions in JD Edwards EnterpriseOne, including their purposes, parameters, and examples. It includes a summary table of functions, explanations of JDE Julian dates, and various routines for date conversion and formatting. The document is intended for EnterpriseOne developers working with date-related functionalities in applications and reports.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
235 views14 pages

Date Business Functions in The EnterpriseOne

Document 626493.1 provides a detailed overview of Date Business Functions in JD Edwards EnterpriseOne, including their purposes, parameters, and examples. It includes a summary table of functions, explanations of JDE Julian dates, and various routines for date conversion and formatting. The document is intended for EnterpriseOne developers working with date-related functionalities in applications and reports.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Document 626493.1 https://support.oracle.com/epmos/faces/DocContentDisplay?_af...

E1: BSFN: Date Business Functions in the EnterpriseOne (Doc ID 626493.1) To Bottom

Modified: 24-May-2013 Type: BULLETIN Status: PUBLISHED Priority: 3 Comments (0)

In this Document

Purpose
Scope
Details
Summary Table of the Date Business Functions
What is JDE Julian Date?
Example
JDE Date Routines: Date Masks Available
API FormatDate
B0000127 ReturnTodaysDate
Purpose
Parameters
B0700068 RetrieveDayofWeek
Purpose
Parameters
B4201480 GetDayofWeek
Purpose
Parameters
B0800013 ConvertStringToDate
Purpose
Parameters
B0800208 ConvertStringDateToDateFormat
Purpose
Parameters
B3000250 GetMonthDescription
Purpose
Parameters
B3000260 GetYearDescription
Purpose
Parameters
B41B0470 FormatDateFromDMY
Purpose
Parameters
Special Instructions:
B7600920 ConvertNumbersAndDatesToString
Purpose
Parameters
B9100001 ConvertjulianDatetojdeDate
Purpose
Parameters
B9800210 Convert From and To Julian Date from JDEDATE
Purpose
ConvertDateToJulian
ConvertJulianToDate
Parameters
ConvertDateToJulian
ConvertJulianToDate
B4500490 DateConversiontoJulian

1 จาก 14 28/8/2556 14:21


Document 626493.1 https://support.oracle.com/epmos/faces/DocContentDisplay?_af...

Purpose
Parameters
B0000200 SixDigitNumerictoDate
Purpose
Parameters
B0000200 DatetoSixDigitNumeric
Purpose
Parameters
B9800460 ConvertDateToString
Purpose
Parameters
N1700090 CalculateBeginDateofPeriod
Purpose
Parameters
N0701500 ConvertDateToStringFormatCode
Purpose
Parameters
Access Date Column in Foreign Table in Oracle Database using API JDB_OpenForeignTable
Release XE/8.0
Release 8.9 and above
Convert Time stored in UTC format in column JSSCHSTTIME in F91320 Scheduler Table to Local Date and Time format
Calculate Week Number of the Year based on a Given Date
References

APPLIES TO:

JD Edwards EnterpriseOne Tools - Version 8.93 and later


Information in this document applies to any platform.

PURPOSE

This document details some of the most common Date Business Functions available in the EnterpriseOne, how to use the business
function and known issues.

SCOPE

This document is intended for the EnterpriseOne Developer who may need to use a Date Business Function while developing or
modifying an Interactive or Batch Application or Report.

DETAILS

Summary Table of the Date Business Functions

Source Module Function Name Input Output

B0000127 ReturnTodaysDate None JDE Date

B0700068 RetrieveDayofWeek JDE Date Numeric Day of the Week


including the Day description in
UpperCase, i.e. 0-SUNDAY,
1-MONDAY, ,.., 6-SATURDAY

B4201480 GetDayofWeek JDE Date Numeric Day of the Week


Day i.e. 0 for Sunday thru 6 for
Saturday

B0800013 ConvertStringToDate String MM/DD/YYYY JDE Date

B0800208 ConvertStringDatetoDateFormat String Date + Date Mask JDE Date

2 จาก 14 28/8/2556 14:21


Document 626493.1 https://support.oracle.com/epmos/faces/DocContentDisplay?_af...

B3000250 GetMonthDescription Numeric Calendar Month Month description, i.e. January,


February, ....

B3000260 GetYearDescription Numeric Calendar Year 4-digit year description

B41B0470 FormatDateFromDMY String YY, MM, DD JDE Date

B7600920 ConvertNumbersAndDatesToString JDE Date String

B9100001 ConvertjulianDatetojdeDate Numeric CYYDDD JDE Date

B9800210 ConvertDateToJulian JDE Date Numeric YYYYDDD


B9800210 ConvertJulianToDate Numeric YYYYDDD JDE Date
B4500490 DateConversiontoJulian JDE Date Numeric CYYDDD

B0000200 SixDigitNumerictoDate Numeric CYYDDD JDE Date

B0000200 DatetoSixDigitNumeric JDE Date Numeric CYYDDD

B9800460 ConvertDateToString JDE Date + Mask String

N1700090 CalculateBeginDateofPeriod Period Number, Company, Period Begin Date, Period End
Fiscal Year and Century Date, Begin Date of Fiscal
Year, and/or Period Ending
Dates for all 14 Periods
N0701500 ConvertDateToStringFormatCode JDE Date String

What is JDE Julian Date?

All dates in the EnterpriseOne database are stored in a JDE Julian format. A date in JDE Julian format is a six-digit numeric field which
represents the century, year and day of the year. It should be updated using the following rules:

The first digit describes the century. A value of 0 indicates the 20th century (1900s). A value of 1 indicates the 21st century
(2000s);
The second and third digits represent the year (08, 09, 10, 11, etc);
The fourth, fifth and sixth digits represent the day in the year (001 for January 1, 112 for April 21, etc.)

Example

The date for January 31, 2010 = 110031 in a Julian date format (CYYDDD).

1 = 21st Century
10 = Year in the 21st Century
031 = Day in the year

NOTE: If the Business Function requires JDEDATE as an input/output parameter, users can only pass parameters with the attribute
of data dictionary item type 11 (Date) and class DATEW. The business function will not return correct information if the user passes
a numeric field of CYYDDD to the JDEDate parameter.

JDE Date Routines: Date Masks Available

Mask Description

D Day Number, 1 or 2 digits

A Day Number, zero pad to 2 digits

Y Day Number, space pad 2 digits

M Month Number, 1 or 2 digits

O Month Number, zero pad to 2 digits

N Month Number, space pad to 2 digits

T Month Number

3 จาก 14 28/8/2556 14:21


Document 626493.1 https://support.oracle.com/epmos/faces/DocContentDisplay?_af...

B Abbreviated Month Name, valid values are: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug,
Sep, Oct, Nov, Dec

R 2 digit year

E 4 digit year

S Date slash character "/"

C Date comma character","

API FormatDate

This API works in combination with the Data Dictionary Item/Alias CenturyChangeYear/CENTCHG. This data dictionary has a default
value specified in the default value tab that indicates when the cutoff is for dates with a century of 20 and when dates should have a
century of 19. When the default value is 10, any date entered with a year up to 10 is preceeded by 20 - i.e. 2005, 2006, 2007, etc. Any
date entered with a year after 10 is preceeded by 19 and assumed to belong to that century - i.e. 1911, 1912, etc. If the current default
value of Alias CENTCHG is 10 and a date of "01/01/2011" is passed in to the API with the format mask of OSASR (as defined in JDE Date
Routines: Date Masks Available), the API will return the string date as "01/01/2011" with a 4-digit year as designed and not as
"01/01/11" with a 2-digit year. If the default value of Alias CENTCHG is changed to a larger default value such as 20 and the data
dictionary change is appropriately deployed throughout EnterpriseOne, then a date of "01/01/2011" passed in to the API with the format
mask of OSASR will be correctly formatted to "01/01/11" as intended.

B0000127 ReturnTodaysDate

Purpose

This function will return today's date in a Julian date (JDE format).

Parameters

Data Structure: D0000127

Parameter Name Data Item Data Type I/O

jddateDateForToday DGJ JDEDATE O

B0700068 RetrieveDayofWeek

Purpose

This function will take a date and return the numeric day of the week (0-6) and its corresponding day description (SUNDAY thru
SATURDAY) in Uppercase.

Numeric Value Day Description in Uppercase

0 SUNDAY

1 MONDAY

2 TUESDAY

3 WEDNESDAY

4 THURSDAY

5 FRIDAY

6 SATURDAY

4 จาก 14 28/8/2556 14:21


Document 626493.1 https://support.oracle.com/epmos/faces/DocContentDisplay?_af...

Parameters

Data Structure: D0700068C

Parameter Name Data Item Data Type I/O

jdDate BDOWLD JDEDATE I

mnDayofWeek DOW MATH_NUMERIC O

dsDayofWeekDesc DS20 CHAR O

To format the Day Description from all Upppercase to only the first character in Uppercase and the remaining characters in Lowercase,
e.g. format WEDNESDAY to Wednesday, use ER Expression Manager TEXT function lower.

Below is the sample ER coding :

Retrieve Day of Week (B0700068)


RV dd_TRDJ -> BF jdDate
RV dd_DOW <- BF mnDayofWeek
RV dd_DS20 <- BF szDayofWeekDesc

RV dd_DS20 = concat(substr([RV dd_DS20],0,1),lower(substr([RV dd_DS20],1,19)))

B4201480 GetDayofWeek

Purpose

This function will take a date, and return the numeric day of the week (0=Sunday, 1=Monday through 6=Saturday) and error code
(0=success).

Parameters

Data Structure: D4201480A

Parameter Name Data Item Data Type I/O

jdDate DTE JDEDATE I

mnDayofWeekA DOW MATH_NUMERIC O

cErrorCode ERRC CHAR O

If using Associated Description feature to display the Day description associated with the parameter variable based on data dictionary
item DOW, add 1 to the value returned in the parameter-variable data item DOW. The Associated Description feature retrieves the
description in UDC JE42/DW that is defined in data dictinary item DOW. The Day description in UDC JE42/DW starts with 1 as Sunday
through 7 as Saturday.

A better alternate function to use when the Day Description is required for Display is business function B0700068 RetrieveDayofWeek.

B0800013 ConvertStringToDate

Purpose

This function will convert a string that is in a date format (MM/DD/YYYY) to a Julian date (JDE format).

The business function does NOT work on One Digit Day and/or Month input.

5 จาก 14 28/8/2556 14:21


Document 626493.1 https://support.oracle.com/epmos/faces/DocContentDisplay?_af...

Parameters

Data Structure: D0800013

Parameter Name Data Item Data Type I/O

jdDateConvertdDate DRQJ JDEDATE O

szStringToConvert VC10A STRING I

B0800208 ConvertStringDateToDateFormat

Purpose

This function will convert a string that is in a date format to a Julian date (JDE format). The Date Mask passed as a literal to the function
describes the format of the string date. For example, if the string date is in a format of 05/29/2002 the format mask to be passed to the
function should be OSASE. If the date was in a format of 052902 the format mask would be OAR. Review the Date Masks Available as in
defined in JDE Date Routines: Date Masks Available.

Parameters

Data Structure: D0800208

Parameter Name Data Item Data Type I/O

jdConvertedDate DRQJ JDEDATE O

szStringToConvert VC10A STRING I

szFormatMask VC09A STRING I

B3000250 GetMonthDescription

Purpose

This function will validate a two digit number entered within a range (1-12) and convert the 2-digit number to a string description of the
month. (1=January, 2=February, 3=March, etc.). The function will return "Invalid Entry" if the input number is not in the range.

Parameters

Data Structure: D3000250

Parameter Name Data Item Data Type I/O

mnCalendarMonth MT MATH_NUMERIC I

szDescription DESC STRING O

NOTE: To get the month description from a JDEDate:

Call B9800460 to convert JDEDate to String (i.e. 12/20/05)


Use the substr Expression Manager function to get the month in String format (i.e. 12)
Call B4000770 to convert a string to numeric to get a numeric calendar month (i.e. 12)

6 จาก 14 28/8/2556 14:21


Document 626493.1 https://support.oracle.com/epmos/faces/DocContentDisplay?_af...

B3000260 GetYearDescription

Purpose

This function will validate a number entered within a range (00-99) and convert a 2-digit number to a 4-digit description of the year. The
function will combine the century and year and give the description (i.e. 19 + 98 = 1998).

If the year is less than or equal to the default value of DCYR data item, then century will be '20'. If the year is greater than the default
value or DCYR data item, then century will be '19'

Parameters

Data Structure: D3000260

Parameter Name Data Item Data Type I/O

mnCalendarYear YR MATH_NUMERIC I

szYearDescription DESC STRING O

NOTE: To get the year description from JDEDate:

Call B9800460 to convert JDEDate to String (i.e. 12/20/05)


Use substr Expression Manager function to get the year in String format (i.e. 05)
Call B4000770 to convert string to numeric to get a numeric calendar year (i.e. 05)

B41B0470 FormatDateFromDMY

Purpose

This business function will convert 3 numeric values (YY, MM, DD) to a Julian date (JDE format). One digit number on the input month
and day is acceptable

Parameters

Data Structure: D41B0470

Parameter Name Data Item Data Type I/O

mnYear YR MATH_NUMERIC I

mnMonth MNTH MATH_NUMERIC I

mnDay DOM MATH_NUMERIC I

jdDate OPDT JDEDATE O

Special Instructions:

This business function calls B0000154. If YY is greater than the default value of CENTCHG (DD item), the century is 19. If YY is less
than the default value of CENTCHG (DD item), the century is 20.

B7600920 ConvertNumbersAndDatesToString

Purpose

7 จาก 14 28/8/2556 14:21


Document 626493.1 https://support.oracle.com/epmos/faces/DocContentDisplay?_af...

This business function will convert a Julian date (JDE format) into a string DDMMYY format (0 pad for one digit day and month).

Parameters

Data Structure: D7600920

Parameter Name Data Item Data Type I/O

NumberToBeConverted MATH01 MATH_NUMERIC I

DateToBeConverted DATE01 JDEDATE I

TargetString REM1 STRING O

LengthOfTargetString INT01 INTEGER I

B9100001 ConvertjulianDatetojdeDate

Purpose

This business function will convert a Julian numeric date (JDE Julian Format of CYYDDD) to a Julian date (JDE format). The first digit of
a Julian numeric date input represents the Century - 0 for 19's, 1 for 20's, 2 for 21's, etc..

Parameters

Data Structure: D9800210

Parameter Name Data Item Data Type I/O

jdDateToConvert TRDJ JDEDATE O

mnJulianDateInYYYYDDD CDL MATH_NUMERIC I

B9800210 Convert From and To Julian Date from JDEDATE

Purpose

ConvertDateToJulian

This function will convert a Julian date (JDE format) to a Julian numeric date (YYYYDDD)

NOTE: This Julian numeric date output is not in the JDE Julian Date format of CYYDDD, but rather in the YYYYDDD format.

ConvertJulianToDate

This function will convert Julian numeric date (YYYYDDD) to a Julian date (JDE format)

NOTE: The input Julian numeric date should not be in the JDE Julian Date format of CYYDDD, but rather in the YYYYDDD format.

Parameters

Data Structure: D9800210

8 จาก 14 28/8/2556 14:21


Document 626493.1 https://support.oracle.com/epmos/faces/DocContentDisplay?_af...

ConvertDateToJulian

Parameter Name Data Item Data Type I/O

jdDateToConvert TRDJ JDEDATE I

mnJulianDateInYYYYDDD CDL MATH_NUMERIC O

ConvertJulianToDate

Parameter Name Data Item Data Type I/O

jdDateToConvert TRDJ JDEDATE O

mnJulianDateInYYYYDDD CDL MATH_NUMERIC I

Data Dictionary item CDL is a 2 digit numeric data item. You might need to use other math numeric data items to pass in/out to the
business function. To get the numeric field to print out on the report, display decimal and edit code need to be changed on the field.

B4500490 DateConversiontoJulian

Purpose

This business function will convert a Julian date that is in JDE Date Format to a math numeric Julian date (JDE Julian Format of
CYYDDD). The first digit of a Julian numeric date input represents the Century - 0 for 19's, 1 for 20's, 2 for 21's, etc...

Parameters

Data Structure: D4500490

Parameter Name Data Item Data Type I/O

jdDateToConvert TRDJ JDEDATE I

mnJulianDateInYYYDDD CDL MATH_NUMERIC O

B0000200 SixDigitNumerictoDate

Purpose

This business function will convert a math numeric that is in JDE Julian format of CYYDDD to a Julian date in JDE Date Format. The first
digit of a Julian numeric date input represents the Century - 0 for 19's, 1 for 20's, 2 for 21's, etc..

Parameters

Data Structure: D0000200B

Parameter Name Data Item Data Type I/O

mnInputNumeric CHGH MATH_NUMERIC I

jdOutputDate DATE01 JDEDATE O

cReturnCode EV01 CHARACTER O

9 จาก 14 28/8/2556 14:21


Document 626493.1 https://support.oracle.com/epmos/faces/DocContentDisplay?_af...

B0000200 DatetoSixDigitNumeric

Purpose

This business function will convert a Julian date that is in JDE Date Format to a math numeric Julian date (JDE Julian Format of
CYYDDD). The first digit of a Julian numeric date input represents the Century - 0 for 19's, 1 for 20's, 2 for 21's, etc...

Parameters

Data Structure: D0000200A

Parameter Name Data Item Data Type I/O

jdInputDate DATE01 JDEDATE I

mnOutputNumeric CHGJ MATH_NUMERIC O

cReturnCode EV01 CHARACTER O

B9800460 ConvertDateToString

Purpose

This business function will convert a Julian date (JDE format) into a string according to the selected MASK. Date Mask is defined in UDC
00/DF.

Parameters

Data Structure: D9800460A

Parameter Name Data Item Data Type I/O

jdDateToConvert DRQJ JDEDATE I

szDateConvertedToString VC08A STRING O

szDateFormat FRMT* STRING I

*User can define the field by selecting Literal and doing a Visual Assist to get the List of valid Values.

Date Mask available (UDC 00/DF)

Codes Description Appearance

Use System Value Regional setting in control


panel

DME Day, Month, 4-digit Year* DD/MM/YY

DMY Day, Month, Year (DDMMYY) DD/MM/YY

EMD 4-digit Year, Month, Day* YY/MM/DD

MDE Month, Day, 4-digit Year* MM/DD/YY

MDY Month, Day, Year (MMDDYY) MM/DD/YY


YMD Year, Month, Day (YYMMDD) YY/MM/DD

NOTE

10 จาก 14 28/8/2556 14:21


Document 626493.1 https://support.oracle.com/epmos/faces/DocContentDisplay?_af...

The business function has a very restrictive date format and will truncate a 4-digit year into a 2-digit year. It hardcodes slash
between the ( day, month, year), it requires a leading 0 for months and days that are a single digit, and outputs a string date that is
only 8 characters long. Therefore, a 4-digit year will be truncated into a 2-digit year as reported in Bug 10719222 with the following
response from Development :
"The data structure member which returns the converted date string to the calling application is only 8 characters long. Date formats
with 4 digit years would be 10 characters long and subsequently they are truncated to 8 characters. To change this data structure
member to a data item that is 10 characters long would require all of the approximately 90 applications and UBEs to reattach the call
to this function. Therefore, the change will not be made at this time.". A workaround solution is to use the the Expression Manager
Date functions ( date_year(), date_month(), date_day() ) to extract individually the year, month, day of the Input date and use the
Expressison Manager Text function concat() to assemble the individual extracted (year, month, day) into the desired date string
format.
Details of the Date and Text functions is in Document 626609.1 E1: FDA: Expression Manager Functions.

This business function uses API FormatDate, passing NULL to szDateFormat will force it to follow the Date Format set in Display
Preference in User Profile, if it is blank in the User Profile, it will follow system setting, for Windows, it is set in the Control Panel ->
Regional Options. For AS400, the date format is controlled by sysval QDATFMT however, AS/400 sysval qdatfmt does not have an
output 4 digit year option.

N1700090 CalculateBeginDateofPeriod

Purpose

This business function will return a period begin date, period end date, beginning date of the fiscal year, and/or the ending dates for all
14 periods of the fiscal year.

Parameters

Data Structure: D1700090

Parameter Name Data Item Data Type I/O

mnPeriodNo PN MATH_NUMERIC I

cRetrieveF0008Records EV01 CHARACTER I


NOTE: Hardcode value to 1

szCompany CO STRING I

mnCentury CTRY MATH_NUMERIC I

mnFiscalYear1 FY MATH_NUMERIC I

jdPeriodBeginDate DTEJ JDEDATE O

jdBeginDateofFiscalYear DTEJ JDEDATE O

jdPeriod1EndDate DTEJ JDEDATE O

jdPeriod2EndDate DTEJ JDEDATE O

jdPeriod3EndDate DTEJ JDEDATE O

jdPeriod4EndDate DTEJ JDEDATE O

jdPeriod5EndDate DTEJ JDEDATE O

jdPeriod6EndDate DTEJ JDEDATE O

jdPeriod7EndDate DTEJ JDEDATE O

jdPeriod8EndDate DTEJ JDEDATE O

jdPeriod9EndDate DTEJ JDEDATE O

jdPeriod10EndDate DTEJ JDEDATE O

jdPeriod11EndDate DTEJ JDEDATE O

jdPeriod12EndDate DTEJ JDEDATE O

jdPeriod13EndDate DTEJ JDEDATE O

11 จาก 14 28/8/2556 14:21


Document 626493.1 https://support.oracle.com/epmos/faces/DocContentDisplay?_af...

jdPeriod14EndDate DTEJ JDEDATE O

cSuppressErrorMessage SUPPS CHARACTER I

szErrorMessageID DTAI STRING O

jdPeriodEndDate DTEJ JDEDATE O

N0701500 ConvertDateToStringFormatCode

Purpose

This business function can be used to give a string format output of a date without having characters to indicate year, month and date.

Currently, available format codes are,

1 - MMDDYYYY
2 - YYYYMMDD
3 - DDMMYYYY
4 - MMDDYY
5 - YYMMDD
6 - DDMMYY

Parameters

Data Structure: D0701500 - Convert Date To String Based On Format Code

Parameter Name Data Item Data Type I/O

jdInputDate_DT DT JDEDATE I

cOutputFormatCode_EV01 EV01 JCHAR I

szOutputDateString_DL01[31] DL01 STRING O

cErrorCode_EV01 EV01 JCHAR O

NOTE

The function pads zero if length of year, month and day is 1 digit
To get year, month and day system function date_year(), date_month() and date_day() are used
B0000083 - MathNumericToStringZeroPad (Math Numeric to String Left Zero Pad, Convert) is used internally

Access Date Column in Foreign Table in Oracle Database using API JDB_OpenForeignTable

When coding a C business function using API JDB_OpenForeignTable in the Oracle database, the Date column in the foreign table is
accessed using the following data structure depending on the release :

Release XE/8.0

Use the JDEDATE data structure

Release 8.9 and above

Use the JDEUTIME data structure and map the JDEUTIME back and forth to the JDEDATE structure with the following APIs :

from UTIME to DATE - API jdeUTime_ConvertToJDEDate()


from DATE to UTIME - API jdeUTime_ConvertFromJDEDate()

Since in Oracle database, the JDEDATE and JDEUTIME items are stored in the same format which is DATE, the API

12 จาก 14 28/8/2556 14:21


Document 626493.1 https://support.oracle.com/epmos/faces/DocContentDisplay?_af...

JDB_OpenForeignTable cannot distinguish between JDEDATE and JDEUTIME on a DATE column and the decision was made to go with
JDEUTIME since JDEUTIME can store more information including the time.

Convert Time stored in UTC format in column JSSCHSTTIME in F91320 Scheduler Table to Local Date and Time format

Follow steps below:

1. Make sure daylight saving rules are set up correctly in P00085 application.

2. Call business function B9800009-Get Time and Date From UTC to convert a UTC time in Local Date and Time format.

When Local time zone is Singapore Time

Get Time and Date From UTC


"18698955" -> mnUTCTime /*Time is elapsed mins since Midnight 1/1/1970 and not elapsed secs*/
VA frm_SchedulerStartTime_SCHSTTIME <- mnTime /*Result is 171500 which is 17:15:00 */
FC Scheduled Start Date <- jdDate /* Result is 07/21/05 */
"2" -> cUTC_Local /* 2 stands for Local Time. 1 stands for UTC time */
"31" -> szTimeZone /* Check UDC H91/TZ for your country time zone */

When Local time zone is US Mountain Time

Get Time and Date From UTC


"18698955" -> mnUTCTime /*Time is elapsed mins since Midnight 1/1/1970 and not elapsed secs */
VA frm_SchedulerStartTime_SCHSTTIME <- mnTime /* Result is 31500 which is 3:15:00*/
FC Scheduled Start Date <- jdDate /* Result is 07/21/05 */
"2" -> BF cUTC_Local /* 2 stands for Local Time. 1 stands for UTC time */
"42" -> BF szTimeZone /* Check UDC H91/TZ for your country time zone */
"1" -> BF cDaylightSavings /* 1 stands for use Daylight Savings */
"USA" -> BF szDaylightSavingsRuleName /* Daylight Savings Rules defined in P00085 */

3. Call business function B9800188-Format MathNumeric to Time String to format the time from numeric format to hh:mm:ss format.

Format MathNumeric to Time String


VA frm_SchedulerStartTime -> mnTime
FC Scheduled Start Time <- szTime
<Zero> -> cFormatMode

To convert Local Date and Time to a UTC time, call business function B9800009-Get UTC Time

When Local time zone is Singapore Time

Get UTC Time


FC UTC Time <- mnUTCTime /* The result will be 18698955 */
"07/21/05" -> jdDate
"171500" -> mnTime /* The local time passed in is 17:15:00 */
"2" -> cUTC_Local /* 2 stands for Local Time. 1 stands for UTC time */
"31" -> szTimeZone /* Check UDC H91/TZ for your country time zone */

When Local time zone is US Mountime Time

Get UTC Time


FC UTC Time <- mnUTCTime /* The result will be 18698955 */
"07/21/05" -> jdDate
"31500" -> mnTime /* The local time passed in is 3:15:00 */
"2" -> cUTC_Local /* 2 stands for Local Time. 1 stands for UTC time */
"42" -> szTimeZone /* Check UDC H91/TZ for your country time zone */
"1" -> cDaylightSavings /* 1 stands for use Daylight Savings */
"USA" -> szDaylightSavingsRuleName

Calculate Week Number of the Year based on a Given Date

Currently, there is no standard business function to calculate the week number of the year based on a given date. For example, March
29 2012 falls in Week 13 of Year 2012.

13 จาก 14 28/8/2556 14:21


Document 626493.1 https://support.oracle.com/epmos/faces/DocContentDisplay?_af...

A custom NER business function will need to be created with the high-level logic steps described below:

1. Convert the Given date to the numeric JDE Julian Date, which is in the format of CYYDDD, using business function B0000200
DatetoSixDigitNumeric. For example, March 29 2012 in JDE Julian Date numeric format is 112089.
2. Extract the last 3 digits of the converted JDE Julian Date to get the Day component number of the JDE Julian Date.
3. Divide the Day Component number by 7. Round the result to the Nearest Whole Number to get the Week Number of the Year.

REFERENCES

NOTE:626609.1 - E1: FDA: Expression Manager Functions


BUG:10719222 - CONVERTDATETOSTRING 4-DIGIT YR - SAR: 4028078

Related
Products
JD Edwards EnterpriseOne > Tools and Technology > EnterpriseOne Tools > JD Edwards EnterpriseOne Tools > Tools - Business Function
JD Edwards EnterpriseOne > Tools and Technology > EnterpriseOne Tools > JD Edwards EnterpriseOne Tools > Tools - Business Function

Keywords
B0000127; B0700068; B0800013; B0800208; B3000250; B3000260; B4000770; B4201480; B4500490; B7600920; B9100001; B9800210; BUSINESS
FUNCTION; CENTCHG; DATE FORMAT; DAY MONTH YEAR; FORMAT MASK; JDE1BSFNDOC; JULIAN DATES; MONTH DAY YEAR

Back to Top

14 จาก 14 28/8/2556 14:21

You might also like