fomat date

how can I format dates to  return ISO format "yyyy-mm-dd hh:mm:ss" ?

i have a string   sData = '#5/17/2001 9:37:00 AM#'
testn1Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ClifConnect With a Mentor Commented:
Format(sData, "yyyy-MM-dd HH:mm:ss")
0
 
testn1Author Commented:
or   sData = '#5/17/2001#'
0
 
ClifCommented:
Oops, I missed the sData (which I presume means it's a string):

Format(CDate(sData), "yyyy-MM-dd HH:mm:ss")
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.