How do you create a date field in a select statement. In other words, I
could create a numeric field called age by the following:

select name, id, 000 as age from <table> order by name into <newtable>

What if I wanted to also create a date field called birthdate. How would I
do that?

Re: create a date field in a select stmt??? by Mike

Mike
Thu Jun 23 09:40:57 CDT 2005

select name, id, 000 as age,ctod("") as birthdate from <table> order by
name into <newtable>

"Bubba Gump Shrimp" <none@microsoft.com> wrote in message
news:%23czoJDAeFHA.3616@TK2MSFTNGP09.phx.gbl...
> How do you create a date field in a select statement. In other words, I
> could create a numeric field called age by the following:
>
> select name, id, 000 as age from <table> order by name into <newtable>
>
> What if I wanted to also create a date field called birthdate. How would I
> do that?
>
>



Re: create a date field in a select stmt??? by Bubba

Bubba
Thu Jun 23 09:47:26 CDT 2005

Man, now that's easy enough.

Thanks!
Buster

"Mike Gagnon" <mgagnon23@hotmail.com> wrote in message
news:uDP%23IIAeFHA.720@TK2MSFTNGP15.phx.gbl...
> select name, id, 000 as age,ctod("") as birthdate from <table> order by
> name into <newtable>
>
> "Bubba Gump Shrimp" <none@microsoft.com> wrote in message
> news:%23czoJDAeFHA.3616@TK2MSFTNGP09.phx.gbl...
>> How do you create a date field in a select statement. In other words, I
>> could create a numeric field called age by the following:
>>
>> select name, id, 000 as age from <table> order by name into <newtable>
>>
>> What if I wanted to also create a date field called birthdate. How would
>> I do that?
>>
>>
>
>



Re: create a date field in a select stmt??? by Fred

Fred
Thu Jun 23 10:05:15 CDT 2005

It's even easier:

select name, id, {} as age from <table> order by name into <newtable>


--
Fred
Microsoft Visual FoxPro MVP


"Mike Gagnon" <mgagnon23@hotmail.com> wrote in message
news:uDP%23IIAeFHA.720@TK2MSFTNGP15.phx.gbl...
> select name, id, 000 as age,ctod("") as birthdate from <table> order by
> name into <newtable>
>
> "Bubba Gump Shrimp" <none@microsoft.com> wrote in message
> news:%23czoJDAeFHA.3616@TK2MSFTNGP09.phx.gbl...
>> How do you create a date field in a select statement. In other words, I
>> could create a numeric field called age by the following:
>>
>> select name, id, 000 as age from <table> order by name into <newtable>
>>
>> What if I wanted to also create a date field called birthdate. How would
>> I do that?
>>
>>
>
>



RE: create a date field in a select stmt??? by Leemi

Leemi
Thu Jun 23 10:18:51 CDT 2005

Hi Bubba Gump Shrimp:

You want to create a data field out of a numeric filed, right? If so, does
the numeric field contain a Julian data vale? If so, look at Sys(10).

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 HAS ARRIVED!! --*
Read about all the new features of VFP9 here:
http://msdn.microsoft.com/vfoxpro/

*--Purchase VFP 9.0 here:
http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003


>How do you create a date field in a select statement. In other words, I
>could create a numeric field called age by the following:

> select name, id, 000 as age from <table> order by name into <newtable>

>What if I wanted to also create a date field called birthdate. How would I
>do that?


Re: create a date field in a select stmt??? by swdev2

swdev2
Fri Jun 24 13:30:28 CDT 2005

Yo Bubba ... errr. Forrest...
date only -> select name, id, {/} as bdate from <table> order by name into
<newtable>

datetime -> select name, id, {/:} as bdate from <table> order by name into
<newtable>

hth - mondo regards [Bill]
Big PS - btw - you're not one of the programmers at the Bubba Gump Shrimp
Company in SFO on the pier, are you ? IF SO - we need to talk about yer POS
POS application.
--
===================
William Sanders / EFG VFP / mySql / MS-SQL
www.efgroup.net/vfpwebhosting
www.dotnetconversions.com
"Bubba Gump Shrimp" <none@microsoft.com> wrote in message
news:#czoJDAeFHA.3616@TK2MSFTNGP09.phx.gbl...
> How do you create a date field in a select statement. In other words, I
> could create a numeric field called age by the following:
>
> select name, id, 000 as age from <table> order by name into <newtable>
>
> What if I wanted to also create a date field called birthdate. How would I
> do that?
>
>