6 digits Julian date is used in some of the ERPs like JDEdward. Eg. 112365 will be stored in database table 's certain field Eg. SDdate . 1:- 12:Year 365:Last day of the year
110030 = Year 2011 Jan 30
How would you convert it into date format ? In MS Access's query, open show query design,
Put below code into that Julian date field Eg, hoTRDJ
CDate(Format(((DateValue("01/01/"+LTrim(Str(1900+Int([hoTRDJ]/1000))))+[hoTRDJ]-Int([hoTRDJ]/1000)*1000))-1,"dd-mm-yy"))
After insertion, then you may use this field to query for the required date. Put this code on the field's Criteria column as below and run it :
Between [StartDate] And [EndDate]
It would then convert from Say 112365 to 31-Dec-2012 on that field.
Hope this would help....
No comments:
Post a Comment