Re: us date format



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]
.



Relevant Pages

  • Re: us date format
    ... >>> I don't know the context where Steve recommended using CLng, ... I don't disagree with this statement: I believe SQL Server uses a different ... there's no reason why you can't use this "trick" to set the ...
    (microsoft.public.access.formscoding)
  • Re: Maccies resort to their typical dishonesty [was Re: You wanted an example of a price drop...]
    ... Agreed - and that includes if you were to show evidence that showed someone ... had broken the law and so stated... ... when not done in the context of a court. ... If so, Steve, do you have *any* counter to my argument against Bush? ...
    (comp.sys.mac.advocacy)
  • Re: Maccies resort to their typical dishonesty [was Re: You wanted an example of a price drop...]
    ... Agreed - and that includes if you were to show evidence that showed someone ... had broken the law and so stated... ... when not done in the context of a court. ... If so, Steve, do you have *any* counter to my argument against Bush? ...
    (comp.sys.mac.advocacy)
  • Re: Cheap PCs
    ... >> clue;) via the context I made the statements in. ... >> attempted to explain this to you and Snit... ... >> that my marriage has not been officially recognized." ... Steve thinks he is arguing against you as he ...
    (comp.sys.mac.advocacy)
  • Re: OT---How the mayor...
    ... in regards to law. ... > Steve, even in law there is no demand for absolute proof. ... You admitted you had NO proof, Snit... ... > shown to be guilty this is a legal context so the jury should ignore the ...
    (comp.sys.mac.advocacy)