Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to display only the date from a date time field
Message
From
30/04/2004 10:12:25
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
29/04/2004 19:19:44
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00899542
Message ID:
00899752
Views:
16
>Hi!
>
>DO you guys have in Visual FoxPRO something equivalent to DateValue() in Visual Basic? In VB this function returns the Date of a DateTime Field, or object given as a parameter, is only a way I know in VB, I dun know about in FoxPro!
>
>here is an example:
>
>Dim MyReturnedDate as String
>MyReturnedDate = DateValue(Now()) ' Return a date.
>
>
>Remarks
>If the date argument includes time information, DateValue doesn't return it. However, if date includes invalid time information (such as "89:98"), an error occurs.

In VFP it's :
MyReturnedDate = ttod(datetime())
where MyReturnedDate is a date type.

MyReturnedDate = dtoc(ttod(datetime()))
where MyReturnedDate is char type. There are plenty of other conversion functions.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform