Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple way to get 1st day of current year
Message
From
06/05/2004 15:14:53
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00901347
Message ID:
00901714
Views:
15
Show off. <bg> Not quite., though. It doesn't work if the date is January 1st of the year.


>I believe this will return the date you require WITHOUT the year function or string manipulations.
>
>? GOMONTH(DATE(),-MONTH(DATE())+1) - DAY(DATE()-1)
>
>
>Glenn
>
>>Given the current date I want to get the first day of the year.
>>
>>Parameter: DATE()
>>Wanted: {01/01/2004}
>>
>>Is there a simple way to do this without using the YEAR function and string manipulations?
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform