Anyone knows how to convert a day function (11) to a stnadard day format (friday 11th)

Anyone knows how to convert a day function (11) to a stnadard day format (friday 11th)

Post by Gerb » Sat, 12 May 2001 18:51:34



I got the next problem im Visual Foxpro, I like to program a weekplanner
for a whole year, but I like to work with a solution like

Friday 11 May, instead of

11-05 or 11 May

I think the solution will be the same for Foxpro as Visual basic.

I can't figure out how to do that, if someone can help me it will be great

Gerben

 
 
 

Anyone knows how to convert a day function (11) to a stnadard day format (friday 11th)

Post by ChD » Sun, 13 May 2001 01:16:34


In VB, two functions are available.
CDate converts a String variable like "Friday May 11" to a Date variable.
Format converts a Date (or any numeric value) to a String
Example:
Dim MyDateString as String, MyDate as Date

MyDate = Now

MyDateString = Format( MyDate, "dddd mmmm dd")
Gives MyDateString the value "Friday May 11"
N.B. The function uses the country parameters of the computer, so in my case
(France)
"Vendredi Mai 11"



Quote:> I got the next problem im Visual Foxpro, I like to program a weekplanner
> for a whole year, but I like to work with a solution like

> Friday 11 May, instead of

> 11-05 or 11 May

> I think the solution will be the same for Foxpro as Visual basic.

> I can't figure out how to do that, if someone can help me it will be great

> Gerben


 
 
 

Anyone knows how to convert a day function (11) to a stnadard day format (friday 11th)

Post by Terry Austi » Sun, 13 May 2001 02:14:59



Quote:> I got the next problem im Visual Foxpro, I like to program a weekplanner
> for a whole year, but I like to work with a solution like

> Friday 11 May, instead of

> 11-05 or 11 May

> I think the solution will be the same for Foxpro as Visual basic.

> I can't figure out how to do that, if someone can help me it will be great

In VB, it would be
Label1.Caption = Format(DateVariable, "dddd dd mmm")

where 'DateVariable' is whatever date you're trying to
format.

Terry Austin

 
 
 

Anyone knows how to convert a day function (11) to a stnadard day format (friday 11th)

Post by Gerb » Sun, 13 May 2001 17:30:52


Thanks for the help people I gonna work all this out

Gerben

 
 
 

1. Scalar Function for Day Where day is 7:01pm one day to 7:00pm the next day

Does anyone have an existing function written for this purpose.

I have a transaction table where transactions are stamped with a
DateTimestamp when a new record is entered.  Unfortunately, to resolve
our transactions with our vendors I need to create a function that
will group all transactions posted from 7:00:01pm one day (ie Monday)
to 7:00:00pm the following day (ie Tuesday).  Basically I am looking
for the same functionality as the existing Day() function but not
being tied to the 12:00 to 12:00 time period.

Here's an example query that needs the new function.

    SELECT Count(T.TransID) AS Units,
           Sum(T.TransAmount) as Rcv,
           Day(T.TransDate) as Day
      FROM Transactions T
     WHERE Month(T.TransDate) = 3
  GROUP BY Day(T.TransDate)
  ORDER BY Day(T.TransDate)

Thanks

2. Accelerated Training for SQL Server 7.0

3. I need an oracle function that converts a date field to the day of the week

4. Subscribe

5. UK Northampton: consultant required for 5 days work commencing Friday

6. SQL Server error message list

7. May day, May day SOS Urgent

8. Slow, slow, slow DDEs

9. Last Day of Month, End of Month, First Day of Month

10. auto backup database day to day

11. WFMP4.1 Calculation of date from Day in the Year and Name of Day

12. Day by day Performance decreasing

13. Day by day performance decreasing