hmm, that kind of does it:
<cfset date = '#DateFormat('#CreateODBCDate(Now())#', 'yyyy-mm-dd')#'>
<cfset testday = #DatePart('d', date)#>
<cfset testmonth = #DatePart('m', date)#>
<cfset testyear = #DatePart('yyyy', date)#>
testday: 7
testmonth: 1
testyear: 2003
which suits my purposes, although not if I wanted 07, 01 etc...
I'll have a look at the List functions, and also the other code posted.
ta ;-)
Ian
----- Original Message -----
From: "Adrian Lynch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 07, 2003 11:03 AM
Subject: RE: [ cf-dev ] splitting up date string...
> DatePart(), or use List functions to tear it apart.
>
> Ade
>
> -----Original Message-----
> From: Ian Westbrook [mailto:[EMAIL PROTECTED]]
> Sent: 07 January 2003 10:59
> To: cfug dev list
> Subject: [ cf-dev ] splitting up date string...
>
>
> Hi
> got a date astring like 2003-01-07, and I want to split it into its
> constituent parts (ie '2003', '01' and '07'). Can anyone tell me which
> function I should be using? I've had a flick through the book, obviously
> missing what I need...
>
> TIA
>
> Ian W
>
> Ian Westbrook,
> FutureDream Media Limited,
> (W): www.futuredream.net
> (E): [EMAIL PROTECTED]
> (T): +44 (0) 1303 258 985
> (M): 07939 510 812
>
> This message may contain information which is legally privileged and/or
> confidential. If you are not the intended recipient, you are hereby
notified
> that any unauthorised disclosure, copying, distribution or use of this
> information is strictly prohibited. Such notification notwithstanding any
> comments, opinions, information or conclusions expressed in this message
are
> those of the originator, not of FutureDream Media Ltd, unless otherwise
> explicitly and independently indicated by an authorised representative of
> FutureDream Media Ltd.
>
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
>
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]