cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-9031%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ESelect%20where%20containing%20a%20date%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-9031%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CP%3EI%20am%20trying%20to%20remove%20the%20rows%20in%20a%20column%20named%20date%20data%20ran%20in%20my%20script.%3C%2FP%3E%3CP%3EI%20have%20tried%20Select%20Where%20(Date%20Data%20Ran%20%3D%3D%2005%2F05%2F2014)%3C%2FP%3E%3CP%3EI%20have%20also%20tried%20Get%20Rows%20where%20(%3ADate%20Data%20Ran%20%3D%3D%2005%2F05%2F2014)%3C%2FP%3E%3CP%3EAlong%20with%20about%20every%20option%20I%20can%20think%20of.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EAny%20help%20would%20be%20appriciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-9034%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Select%20where%20containing%20a%20date%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-9034%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EOops--%20thank%20you%20for%20catching%20that%2C%20PMroz!%20I%20use%20date()%20so%20often%20that%20I%20forgot%20it%20is%20a%20custom%20function%20I%20wrote%20to%20call%20informat%20with%20d%2Fm%2Fy.%20My%20apologies!%26nbsp%3B%20PMroz's%20method%20is%20perfect.%3C%2FP%3E%3CP%3EJulian%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-9033%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Select%20where%20containing%20a%20date%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-9033%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHaven't%20see%20the%20%3CSTRONG%3Edate%3C%2FSTRONG%3E%20function.%26nbsp%3B%20Is%20that%20something%20you%20wrote%3F%26nbsp%3B%20Anyway%20this%20will%20do%20what%20you%20want%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3Edt%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%230000dd%3B%22%3ENew%20Table%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-family%3A%20'Courier%20New'%3B%22%3E(%3C%2FSTRONG%3E%20%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20purple%3B%22%3E%22Sample%20Table%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Add%20Rows%3CSTRONG%3E(%3C%2FSTRONG%3E%20%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20teal%3B%20font-family%3A%20'Courier%20New'%3B%22%3E4%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%20%3CSTRONG%3E)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%230000dd%3B%22%3ENew%20Column%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-family%3A%20'Courier%20New'%3B%22%3E(%3C%2FSTRONG%3E%20%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20purple%3B%22%3E%22Date%20Data%20Ran%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Numeric%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Continuous%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%230000dd%3B%22%3EFormat%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-family%3A%20'Courier%20New'%3B%22%3E(%3C%2FSTRONG%3E%20%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20purple%3B%22%3E%22d%2Fm%2Fy%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSTRONG%20style%3D%22color%3A%20teal%3B%20font-family%3A%20'Courier%20New'%3B%22%3E12%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%20%3CSTRONG%3E)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Input%20Format%3CSTRONG%3E(%3C%2FSTRONG%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20purple%3B%22%3E%22d%2Fm%2Fy%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%20%3CSTRONG%3E)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Set%20Values%3CSTRONG%3E(%3C%2FSTRONG%3E%20%3CSTRONG%3E%5B%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20teal%3B%20font-family%3A%20'Courier%20New'%3B%22%3E3482092800%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSTRONG%20style%3D%22color%3A%20teal%3B%20font-family%3A%20'Courier%20New'%3B%22%3E3484771200%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSTRONG%20style%3D%22color%3A%20teal%3B%20font-family%3A%20'Courier%20New'%3B%22%3E3487363200%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20teal%3B%22%3E3482092800%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%5D%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%20%3CSTRONG%3E)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSTRONG%3E)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-family%3A%20'Courier%20New'%3B%22%3E)%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3Esearch_date%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%230000dd%3B%22%3Einformat%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-family%3A%20'Courier%20New'%3B%22%3E(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20purple%3B%22%3E%2205%2F05%2F2014%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20purple%3B%22%3E%22d%2Fm%2Fy%22%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-family%3A%20'Courier%20New'%3B%22%3E)%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3Edel_rows%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%20dt%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%26lt%3B%26lt%3B%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3Eget%20rows%20where%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E(%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%3A%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3EDate%20Data%20Ran%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%3D%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%20search_date%3CSTRONG%3E)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3Edt%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%26lt%3B%26lt%3B%3C%2FSPAN%3E%20%3CSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3Edelete%20rows%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E(%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3Edel_rows%3CSTRONG%3E)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20navy%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-9032%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Select%20where%20containing%20a%20date%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-9032%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHi%20Vickie%2C%3C%2FP%3E%3CP%3EDates%20get%20a%20bit%20tricky%20in%20how%20they're%20stored.%20Unless%20the%20date%20column%20is%20a%20character%20column%20(so%20the%20dates%20are%20really%20just%20strings)%20you'll%20need%20to%20search%20for%20that%20date%20based%20on%20its%20epoch%20time.%20Here's%20a%20way%20to%20get%20JMP%20to%20do%20that%20for%20you%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%20style%3D%22font-size%3A%2012px%3B%20font-family%3A%20Courier%3B%20color%3A%20%23032ce4%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3Edt%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%20%3C%2FSPAN%3ECurrent%20Data%20Table%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSTRONG%3E()%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22font-size%3A%2012px%3B%20font-family%3A%20Courier%3B%22%3EsearchDate%20%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3D%3C%2FSPAN%3E%20date%3CSTRONG%3E(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23009193%3B%22%3E%3CSTRONG%3E05%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23009193%3B%22%3E%3CSTRONG%3E05%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%2F%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23009193%3B%22%3E%3CSTRONG%3E2014%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSTRONG%3E)%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22font-size%3A%2012px%3B%20font-family%3A%20Courier%3B%22%3Edt%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%26lt%3B%26lt%3B%3CSTRONG%3ESelect%20Where%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSTRONG%3E(%3ADate%20Data%20Ran%3C%2FSTRONG%3E%20%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3D%3D%3C%2FSPAN%3E%20searchDate%3CSTRONG%3E)%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3EI%20hope%20this%20helps!%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3EJulian%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3CSTRONG%3EEDIT%3A%20See%20PMroz's%20suggestion%20--%20my%20code%20will%20only%20work%20with%20additional%20code%20to%20define%20the%20date()%20function%20I%20used.%20%3C%2FSTRONG%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
vickie_moser
Level I

Select where containing a date

I am trying to remove the rows in a column named date data ran in my script.

I have tried Select Where (Date Data Ran == 05/05/2014)

I have also tried Get Rows where (:Date Data Ran == 05/05/2014)

Along with about every option I can think of.

Any help would be appriciated.

1 ACCEPTED SOLUTION

Accepted Solutions
pmroz
Super User

Re: Select where containing a date

Haven't see the date function.  Is that something you wrote?  Anyway this will do what you want:

dt = New Table( "Sample Table",

     Add Rows( 4 ),

     New Column( "Date Data Ran",

           Numeric,

           Continuous,

           Format( "d/m/y", 12 ),

           Input Format( "d/m/y" ),

           Set Values( [3482092800, 3484771200, 3487363200, 3482092800] )

     )

);

search_date = informat("05/05/2014", "d/m/y");

del_rows = dt << get rows where(:Date Data Ran == search_date);

dt << delete rows(del_rows);

View solution in original post

3 REPLIES 3
julian
Community Manager Community Manager

Re: Select where containing a date

Hi Vickie,

Dates get a bit tricky in how they're stored. Unless the date column is a character column (so the dates are really just strings) you'll need to search for that date based on its epoch time. Here's a way to get JMP to do that for you:

dt = Current Data Table();

searchDate = date(05/05/2014);

dt<<Select Where(:Date Data Ran == searchDate);



I hope this helps!

Julian


EDIT: See PMroz's suggestion -- my code will only work with additional code to define the date() function I used.

pmroz
Super User

Re: Select where containing a date

Haven't see the date function.  Is that something you wrote?  Anyway this will do what you want:

dt = New Table( "Sample Table",

     Add Rows( 4 ),

     New Column( "Date Data Ran",

           Numeric,

           Continuous,

           Format( "d/m/y", 12 ),

           Input Format( "d/m/y" ),

           Set Values( [3482092800, 3484771200, 3487363200, 3482092800] )

     )

);

search_date = informat("05/05/2014", "d/m/y");

del_rows = dt << get rows where(:Date Data Ran == search_date);

dt << delete rows(del_rows);

julian
Community Manager Community Manager

Re: Select where containing a date

Oops-- thank you for catching that, PMroz! I use date() so often that I forgot it is a custom function I wrote to call informat with d/m/y. My apologies!  PMroz's method is perfect.

Julian

Recommended Articles