Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need YYYYDDD to DATE() function. Anyone?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00468591
Message ID:
00468596
Views:
11
>>I have a DATE() to YYYYDDD function already but I received a file full of YYYYDDD instead of dates and need to get dates.
>>
>>Does anyone havce a quick algorithm/function already? Before I waste time reinventing the wheel.
>>
>>TIA
>right out the top of my head:
>year = val(left(yyyyddd,4))
>day = val(right(yyyyddd,3))
>dDate = Date(year,1,1)-1+day


Shorter form:
dDate = Date(val(left(yyyyddd,4)),1,1)-1+val(right(yyyyddd,3))
Previous
Reply
Map
View

Click here to load this message in the networking platform