• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Gregorian Date

markjde

Active Member
This is a multi-part message in MIME format.

------=_NextPart_000_0068_01C07122.F38D89E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

I have a table that has a date field YYYYMMDD. What is the best method for
translating this into a julian date and what is the best method of getting a
julian date into this date format?

Thanks.

Mark Smith

markjde@hotmail.com

------=_NextPart_000_0068_01C07122.F38D89E0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4611.1300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I have atable that has a date =
field=20
YYYYMMDD. What is the best method for translating this into a =
julian date=20
and what is the best method of getting a julian date into this date=20
format? </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks.</FONT></DIV>
<DIV>
<FONT face=3DArial size=3D2>Mark Smith</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT></DIV>
<DIV><A href=3D"mailto:markjde@hotmail.com"><FONT face=3DArial=20
size=3D2>markjde@hotmail.com</FONT></A></DIV></BODY></HTML>

------=_NextPart_000_0068_01C07122.F38D89E0--
 

Zoltan_Gyimesi

Legendary Poster
Mark,
Could you add some more information for us?

1.) Is your table a foreign table or defined in OneWorld as a custom or original?
2.) What is the type of your field (Date, Integer, MathNumeric, String, one of the native types of foreign table, etc.)?
3.) If your table is a foreign table then:
3.a.) In what kind of database does it reside (Access, SQL, Oracle, DB2, etc.)?
3.b.) How do you acces this table in OneWorld (e.g. as a new datasource through ODBC)? Do you want to access it in OW at all?

... and your OW version?

Happy New Year!
Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 

Gergely_Pongracz

Well Known Member
Mark,
If you handle dates in a One World program your system doesn't use Julian
or Gregorian dates, but JdeDate which is a structure built up of fields
date, month, day, all integers. In ER programming you can access all these
fields whith date_year(JdeDate), date_month(JdeDate) etc. functions. I think
your gregorian format can only be represented in OW as a string (but if it
is numeric it doesn't make too much difference) so you have to write ER
conversions between the numbers and the elements of your string (it's not
too difficult). In a case where we had to get a string output from JdeDate
we wrote a NER Business Function that handled the conversion (Convert Date
to String Flexible, we used format strings to describe the required elements
and separators)
Regards and Happy New Year!
Gergely Pongrácz
Synergon, Hungary

> ----------
> From: markjde[SMTP:markjde@hotmail.com]
> Reply To: jdeowdev@jdelist.com
> Sent: Friday, December 29, 2000 5:08 AM
> To: jdeowdevml@jdelist.com
> Subject: Gregorian Date ~~0:3220
>
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_0068_01C07122.F38D89E0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: 7bit
>
> I have a table that has a date field YYYYMMDD. What is the best method
> for
> translating this into a julian date and what is the best method of getting
> a
> julian date into this date format?
>
> Thanks.
>
> Mark Smith
>
> markjde@hotmail.com
>
> ------=_NextPart_000_0068_01C07122.F38D89E0
> Content-Type: text/html;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=3DContent-Type content=3D"text/html; =
> charset=3Diso-8859-1">
> <META content=3D"MSHTML 5.50.4611.1300" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=3D#ffffff>
> <DIV><FONT face=3DArial size=3D2>I have atable that has a date =
> field=20
> YYYYMMDD. What is the best method for translating this into a =
> julian date=20
> and what is the best method of getting a julian date into this date=20
> format? </FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>Thanks.</FONT></DIV>
> <DIV>
<FONT face=3DArial size=3D2>Mark Smith</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT></DIV>
> <DIV><A href=3D"mailto:markjde@hotmail.com"><FONT face=3DArial=20
> size=3D2>markjde@hotmail.com</FONT></A></DIV></BODY></HTML>
>
> ------=_NextPart_000_0068_01C07122.F38D89E0--
>
>
>
>
> --------------------------
> To view this thread, visit the JDEList forum at:
> http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=0&Board=OWDEV&Nu
> mber=3220
> *************************************************************
> This is the JDEList One World / XE Developers Mailing List.
> Archives and information on how to SUBSCRIBE, and
> UNSUBSCRIBE can be found at http://www.JDELIST.com
> *************************************************************
>
 

Zoltan_Gyimesi

Legendary Poster
Re: RE: Gregorian Date

Mark,
... and we have written an other conversion NER BSFN: "Convert String To Date Flexible" too. It converts dates represented with two or four digit year too to jdeDate. In two digit case you have to designate a two digit separator year. The only needs against the input string is that the year, month and day part of the date have to be reside on the same character positions (e.g. you can define it as "nMonthFromPosition" and "nMonthLength", etc.), further the day, month and year can contain leading and trailing blanks and leading zeros (e.g. September could be: 09, _9 or 9_), so you can convert YMD, MDY, DMY formats with or without separator characters.
I almost have forgot, the input date represanted by the string could be Julian or "normal".
:)) ... and of course it calls our "Convert String To Numeric" NER BSFN conversion.
Happy New Year!
Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 

got_to_love_jde

Reputable Poster
Re: RE: Gregorian Date

Zoltan,
did you have these added to the Tips ? sounds like something a lot of people could use.
dave


NT 4.0 SP5, SQL 7.0, One World B7321 SP12.4, Citrix
 

Zoltan_Gyimesi

Legendary Poster
Re: RE: Gregorian Date

Dave,
I couldn't add it to the Tips.
Eric can do it.
You can read a short conversation with the subject "How to post to the new Tips & Traps forum" initiated on 12/20/00 09:02 AM by me on the General Forum.
Happy New Year!
Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 

markjde

Active Member
Zoltan,

1. The table is defined to OW as a customized table.
2. The field is defined as Numeric (YYYYMMDD)

Thanks for the assistance.


Mark
----- Original Message -----
From: "Zoltan_Gyimesi" <zoltan.gyimesi@synergon.hu>
To: <jdeowdevml@jdelist.com>
Sent: Friday, December 29, 2000 9:33 AM
Subject: Re: Gregorian Date ~~3220:3229


> Mark,
> Could you add some more information for us?
>
> 1.) Is your table a foreign table or defined in OneWorld as a custom or
original?
> 2.) What is the type of your field (Date, Integer, MathNumeric, String,
one of the native types of foreign table, etc.)?
> 3.) If your table is a foreign table then:
> 3.a.) In what kind of database does it reside (Access, SQL, Oracle, DB2,
etc.)?
> 3.b.) How do you acces this table in OneWorld (e.g. as a new datasource
through ODBC)? Do you want to access it in OW at all?
>
> ... and your OW version?
>
> Happy New Year!
> Zoltán
>
> B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
> (working with B7321, B7331, XE too)
> --------------------------
> Visit the forum to view this thread at:
>
http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=&Board=OWDEV&Numbe
r=3229
> *************************************************************
> This is the JDEList One World / XE Developers Mailing List.
> Archives and information on how to SUBSCRIBE, and
> UNSUBSCRIBE can be found at http://www.JDELIST.com
> *************************************************************
>
>
 

markjde

Active Member
Re: RE: Gregorian Date

Dave,

What is the best why to access these tips?

Thanks.

Mark
----- Original Message -----
From: "got_to_love_jde" <got_to_love_jde@yahoo.com>
To: <jdeowdevml@jdelist.com>
Sent: Friday, December 29, 2000 12:19 PM
Subject: Re: RE: Gregorian Date ~~3220:3243


> Zoltan,
> did you have these added to the Tips ? sounds like something a lot
of people could use.
> dave
>
>
> NT 4.0 SP5, SQL 7.0, One World B7321 SP12.4, Citrix
> --------------------------
> Visit the forum to view this thread at:
>
http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=&Board=OWDEV&Numbe
r=3243
> *************************************************************
> This is the JDEList One World / XE Developers Mailing List.
> Archives and information on how to SUBSCRIBE, and
> UNSUBSCRIBE can be found at http://www.JDELIST.com
> *************************************************************
>
>
 
you could simply use the business function "Convert String to Date"

Franck BLETTNER

email: mailto:f.blettner@focal.fr
tel. (33) 04 72 13 16 16
FOCAL Ingénierie SUD
Le 6e Avenue, 75, cours Albert Thomas
69447 LYON Cedex 03 FRANCE



-----Message d'origine-----
De : Gergely Pongracz [mailto:Gergely.Pongracz@synergon.hu]
Envoyé : vendredi 29 décembre 2000 17:23
À : jdeowdevml@jdelist.com
Objet : RE: Gregorian Date ~~3220:3233


Mark,
If you handle dates in a One World program your system doesn't use Julian
or Gregorian dates, but JdeDate which is a structure built up of fields
date, month, day, all integers. In ER programming you can access all these
fields whith date_year(JdeDate), date_month(JdeDate) etc. functions. I think
your gregorian format can only be represented in OW as a string (but if it
is numeric it doesn't make too much difference) so you have to write ER
conversions between the numbers and the elements of your string (it's not
too difficult). In a case where we had to get a string output from JdeDate
we wrote a NER Business Function that handled the conversion (Convert Date
to String Flexible, we used format strings to describe the required elements
and separators)
Regards and Happy New Year!
Gergely Pongrácz
Synergon, Hungary

> ----------
> From: markjde[SMTP:markjde@hotmail.com]
> Reply To: jdeowdev@jdelist.com
> Sent: Friday, December 29, 2000 5:08 AM
> To: jdeowdevml@jdelist.com
> Subject: Gregorian Date ~~0:3220
>
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_0068_01C07122.F38D89E0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: 7bit
>
> I have a table that has a date field YYYYMMDD. What is the best method
> for
> translating this into a julian date and what is the best method of getting
> a
> julian date into this date format?
>
> Thanks.
>
> Mark Smith
>
> markjde@hotmail.com
>
> ------=_NextPart_000_0068_01C07122.F38D89E0
> Content-Type: text/html;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=3DContent-Type content=3D"text/html; =
> charset=3Diso-8859-1">
> <META content=3D"MSHTML 5.50.4611.1300" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=3D#ffffff>
> <DIV><FONT face=3DArial size=3D2>I have atable that has a date =
> field=20
> YYYYMMDD. What is the best method for translating this into a =
> julian date=20
> and what is the best method of getting a julian date into this date=20
> format? </FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>Thanks.</FONT></DIV>
> <DIV>
<FONT face=3DArial size=3D2>Mark Smith</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT></DIV>
> <DIV><A href=3D"mailto:markjde@hotmail.com"><FONT face=3DArial=20
> size=3D2>markjde@hotmail.com</FONT></A></DIV></BODY></HTML>
>
> ------=_NextPart_000_0068_01C07122.F38D89E0--
>
>
>
>
> --------------------------
> To view this thread, visit the JDEList forum at:
> http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=0&Board=OWDEV&Nu
> mber=3220
> *************************************************************
> This is the JDEList One World / XE Developers Mailing List.
> Archives and information on how to SUBSCRIBE, and
> UNSUBSCRIBE can be found at http://www.JDELIST.com
> *************************************************************
>




--------------------------
To view this thread, visit the JDEList forum at:
http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=0&Board=OWDEV&Numb
er=3233
*************************************************************
This is the JDEList One World / XE Developers Mailing List.
Archives and information on how to SUBSCRIBE, and
UNSUBSCRIBE can be found at http://www.JDELIST.com
*************************************************************
 
Top