Re: us date format
- From: Marshall Barton <marshbarton@xxxxxxxxxx>
- Date: Sat, 21 Jan 2006 21:03:19 -0600
Douglas J. Steele wrote:
>"Marshall Barton" wrote
>> Bob Wickham wrote:
>>
>> I don't know the context where Steve recommended using CLng,
>> but the only reason I can think of is to drop the Time part
>> of a date value. Not to say Steve didn't have something
>> clever in mind, but I do not see how it can help in a
>> situation inolving the Default Value.
>
>I believe what Steve may have been suggesting is that you can use:
>
>Me![PaymentDate].DefaultValue = CLng(Me![PaymentDate])
>
>rather than
>
>Me![PaymentDate].DefaultValue = "#" & Format$(Me![PaymentDate],
>"yyyy-mm-dd") & "#"
I never thought of that. It is clever, but it does rely on
Access to convert from a long to a date. While I don't
really have a problem with that, it is not in the slightest
portable to other contexts that don't provide the same
implicit conversions.
Based on that thinking, I wouldn't trust it in SQL Server
SQL statements without seeing some definitive documentation
to that effect.
--
Marsh
MVP [MS Access]
.
- Follow-Ups:
- Re: us date format
- From: Douglas J. Steele
- Re: us date format
- References:
- us date format
- From: Bob Wickham
- Re: us date format
- From: Marshall Barton
- Re: us date format
- From: Bob Wickham
- Re: us date format
- From: RoyVidar
- Re: us date format
- From: Bob Wickham
- Re: us date format
- From: RoyVidar
- Re: us date format
- From: Bob Wickham
- Re: us date format
- From: Marshall Barton
- Re: us date format
- From: Douglas J. Steele
- us date format
- Prev by Date: Re: Need Help in DLookup Function
- Next by Date: Re: Timing problem???
- Previous by thread: Re: us date format
- Next by thread: Re: us date format
- Index(es):
Relevant Pages
|